I need to copy a set of DLL and PDB files from a set of folders recursively into another folder. I don't want to recreate the folder hierarchy in the target folder. I want to use built in Windows tools, e.g. DOS commands.
In the search box (top right), type NOT kind:folder . You will now see a list of all files in your current folder and all its subfolders. Use Control-A to select all the files. Now you can move them all to another folder.
Use xcopy with /S switch to copy all files and directories recursively.
In order to copy the content of a directory recursively, you have to use the “cp” command with the “-R” option and specify the source directory followed by a wildcard character.
mkdir targetDir for /r %x in (*.dll, *pdb) do copy "%x" targetDir\
Use /Y at the end of the above command if you are copying multiple files and don't want to keep answering "Yes".
command XCOPY
example of copying folder recursively:
mkdir DestFolder xcopy SrcFolder DestFolder /E
(as stated below in the comment following WIKI that command was made available since DOS 3.2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With