Copy files from multiple folders to one folder-batch

February 4, 2012 at 02:27:30
Specs: Windows XP
Consider a directory D:\Games in which there are multiple folders and inside each folder there are multiple files..how do i copy all the files only from these foldrers to E:\Games..

Note: Only the files from these folders have to be copied to E drive not the folders..

Is there any way? Need Help...


See More: Copy files from multiple folders to one folder-batch

Report •

#1
February 4, 2012 at 04:00:44
dir /s /ad > junk1.txt
find "Directory of" junk1.txt > junk2.txt

You have a list of all the directories to copy from!

OR the easier route:

FOR /R D:\GAMES %%i IN (1) DO COPY *.* E:\Games

See "FOR /?" for help.


Report •

#2
February 4, 2012 at 21:55:30
Its not entering the directory rather than its taking the files which is kept outside the folders..the batch should enter each and every folder ands have to copy only the files to another folder

Report •

#3
February 5, 2012 at 00:04:07
Try each of the following:

FOR /R D:\GAMES %%i IN (.) DO COPY *.* E:\Games

FOR /R D:\GAMES %%i IN (*.*) DO COPY %%i E:\Games

Don't forget to check the on-screen help for debugging ("FOR /?").

Did you remember to enable Command Extensions?


Report •
Related Solutions


Ask Question