hi guys
I'm not even sure whether this is possible, but...
I have a list of filenames (abcd.pdf, 1234.pdf etc) that i want to search in a directory, which has sub directories to find each of the filenames and copy them to a new folder.
Can you help?!?
TVM
Batch code to find a list of filenames in a dir. and copy
Moderator: DosItHelp
Re: Batch code to find a list of filenames in a dir. and cop
Maybe this batch may help you:
Remove the echo, if this is what you wanted to do.
penpen
Code: Select all
for /F "tokens=* delims=" %%a in ('dir abcd.pdf 1234.pdf /A-D /B /S 2^>nul') do echo copy "%%~a" newTargetFolder
penpen