Multiple file copy?

Soldato
Joined
18 Oct 2002
Posts
4,073
Location
cidade maravilhosa
How can I copy multiple files (jpg) from within multiple folders into one single folder?


I need to copy around 300 (Specific) photos from different folders into a single folder ready for uploading.

I have a list of the file names already.
 
Last edited:
Can you can create a plain text file with each file (including path) on it's own line? E.g.

c:\source1\file1.jpg
c:\source2\file2.jpg
etc.


If you can then you should be able to use the following command:

for /f %i in (filelist.txt) do copy %i c:\target\%~nxi
 
Can you can create a plain text file with each file (including path) on it's own line? E.g.

c:\source1\file1.jpg
c:\source2\file2.jpg
etc.


If you can then you should be able to use the following command:

for /f %i in (filelist.txt) do copy %i c:\target\%~nxi

as a batch file ?
can I use wild cards?
 
Last edited:
Hi, you could do it directly from the command line, or put it into a batch file if it was something you wanted to be able to repeat.
If you're putting it into a batch file, you'd have to change the "%"s to "%%"s
 
I didn't see your edit until now. I'm not sure if wild cards would work in the %~nxi bit so you'd have to try it and see.
 
Back
Top Bottom