views:

75

answers:

2

I have this massive folder structure with thousands of folders and subfolders. I need to copy all the DLLs from this structure into a single folder.

I've tried the

xcopy *.dll c:\output /S /E

but that copies the DLLs with the structure.

Is there a way to do what I want in a batch file using DOS commands only.

+3  A: 

Assuming no spaces in folder/file names:

for /r %f in (*.dll) do copy %f %~nf.dll
Codism
Sorry, I don't follow. Say I want to copy DLLs from c:\largeStructure to c:\onlyDLLs. What would the line be?
AngryHacker
it would be for /r c:\largeStructure %f in (*.dll) do @copy "%f" c:\onlyDLLs
Gaby
+2  A: 

You can look at a duplicate of this at

superuser: xcopy files into single directory

Gaby