Question : Simple (I think) but Urgent:  Copy (XCopy?) files from multiple subdirectories into one directory

Given a folder c:\docs, with a complex subdirectory structure, is there a way I can copy all the *.doc files in c:\docs\, and all subdirectories of c:\docs, into a single directory?  Preferably this would be c:\docs, but I can handle another directory.

I thought XCopy would do this, but if I specify the /S parameter, it creates the subdirectory, only giving me a carbon copy of the docs directory.

This is probably simple but urgent, so I give it 500 points...

Answer : Simple (I think) but Urgent:  Copy (XCopy?) files from multiple subdirectories into one directory

NT with extensions on?  WIN 9X does not know FOR /F ...


From command line all %% must become %

for /F %f in ('dir /b /s c:\docs\*.doc') do echo copy "%f" "c:\doccopy\%~nxf"


(This still be steve's answer)

2K
(\o/)
Random Solutions  
 
programming4us programming4us