Possible Duplicate:
merging all files into one folder from different folders

Hello all, I have a similar issue to this post http://superuser.com/questions/180573/move-files-from-multiple-folders-all-into-parent-directory-with-command-prompt-w

However I have an image directory with multiple sub-directories, I'd like to move all images from the sub-directories to the root directory.

F:\Pictures\100KC1
F:\Pictures\100KG2
F:\Pictures\100LF1

and I'd like to move all the images from each sub to

F:\Pictures\

System is Win7 64-bit, I'd prefer doing it command line or batch script but if there is an app I'd accept that as well. Thanks

link|improve this question
You say "bash" in your title. Do you have Bash available to be used to accomplish this task? – Dennis Williamson Oct 3 '10 at 6:37
Sorry meant batch – jon3laze Oct 3 '10 at 8:22
You may want to check my answer to the other question. I've made an application that does this, and it handles unexpected situations too, plus shows stats, and has some command-line niceties. – Camilo Martin Dec 27 '10 at 21:57
feedback

closed as exact duplicate by Sathya, random Oct 4 '10 at 4:12

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ for guidance on how to improve it.

1 Answer

up vote 0 down vote accepted

Took me like 3 seconds to Google this:

http://www.computerhope.com/xcopyhlp.htm

You would write your .bat file like this:

xcopy f:\Pictures\100KC1 f:\Pictures /y /e
xcopy f:\Pictures\100KG2 f:\Pictures /y /e
xcopy f:\Pictures\100LF1 f:\Pictures /y /e
exit

This will also copy any directories in your source directories to your destination directory.

If you want to use the command line just use && between each xcopy statement like this:

 xcopy f:\Pictures\100KC1 f:\Pictures /y /e && xcopy f:\Pictures\100KG2 f:\Pictures /y /e && xcopy f:\Pictures\100LF1 f:\Pictures /y /e

Results will be the same.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.