views:

1205

answers:

3

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.

Thanks in advance.

A: 

I'm not aware of any command line tools that do this directly, but you could create a batch script to loop through sub folders, and copy the files you need.

However you may end up with files with duplicate filenames if you place them all in the same folder.

Ady
+8  A: 
mkdir targetDir
for /r %x in (*.dll, *pdb) do copy "%x" targetDir\
Alexander Prokofyev
nice one. wasn't to sure of the syntax.
Ady
without the comma
Rob Kam
use "%%x" in a batch file
bob
A: 

awesome, thanks a lot Alexander

Brian