This should do it, assuming that you want to copy the entire contents of each subfolder (i.e. the subfolders contain only the three jpgs):
cd /d "d:\work files\colors\finished"
for /r %d in (*) do copy "%d" "d:\Completed Color Files"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi everyone, I am looking for a way that I can copy all my jpg files from SubFolders into a Single Folder, without having to actually go into each SubFolder and perform a Drag and Drop.
Each Subfolder is in the same Directory Tree (for example):
d:\Work Files\Colors\Finished\1
...
d:\Work Files\Colors\Finished\1200
In each SubFolder there are three jpg's that I want to copy. I want all the jpg's in every subfolder to go to a single folder:
d:\Completed Color Files
I've been trying to use the for /r %d in (.) do copy %d*.jpg d:\Completed Color Files
The copy command fails because the %d (Current Path) has a . at the end of it. Can anyone help me here, I really don't want to have to do all these by drag and drop.
Bob
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
This should do it, assuming that you want to copy the entire contents of each subfolder (i.e. the subfolders contain only the three jpgs):
cd /d "d:\work files\colors\finished"
for /r %d in (*) do copy "%d" "d:\Completed Color Files"
for /r %d in (*.jpg) do copy "%d" "d:\Completed Color Files"
This works, but it is so 1990's. This works just as good a GUI format
1 - Go to the common parent of all your pictures. D:\Work Files\Colors\Finished\ .
2 - Type an asterisk into the Search box at the top-right. All files and folders under your current position will be listed.
3 - Sort by name, which will group all the folders together, and then all the files together as well (in a flat view, regardless of what folder they are really in).
4 - Select all the files, press "ctrl" and drag them into the folder you really want them to be stored in D:\Completed Color Files.
Have fun.
Hi everyone, I am looking for a way that I can copy all my jpg files from SubFolders into a Single Folder, without having to actually go into each SubFolder and perform a Drag and Drop.
Each Subfolder is in the same Directory Tree (for example):
d:\Work Files\Colors\Finished\1
...
d:\Work Files\Colors\Finished\1200
In each SubFolder there are three jpg's that I want to copy. I want all the jpg's in every subfolder to go to a single folder:
d:\Completed Color Files
I've been trying to use the for /r %d in (.) do copy %d*.jpg d:\Completed Color Files
The copy command fails because the %d (Current Path) has a . at the end of it. Can anyone help me here, I really don't want to have to do all these by drag and drop.
Bob
Hi..
step:1 Go through your Directory for (i.e. the sub folders contain only the three JPEGs)
Setp:2 search the mentioned extension(i.e).jpg
Thanks Steve, that works for what I needed to have happen.
Bob