1987Views6Replies

Author Options:

Batch file to copy files Answered

Some body help me to create batch file which can copy files from a folder one by one into many folders. For example if one folder has 10 files then I have to copy those files (one in each) in each subdirectory of a given directory.

Discussions

0
None
Prof. Pickle

5 years ago

Ummm... I know this is an old post, but I think I may have found some of your solution.

FOR /​R [path to the files you want copied] %%I IN (Files you want copied) DO COPY [files you want copied] [place where you want them copied]

0
None
Goodhart

10 years ago

It would be easier to do that manually I am afraid

0
None
caitlinsdadGoodhart

Reply 10 years ago

"Think smarter...not harder..." quote from somebody

0
None
caitlinsdad

10 years ago

Oh, I forgot, if you can figure out how to create the batch file, I will leave it up to you on how to execute or run the file...:)

0
None
caitlinsdad

10 years ago

If in Windows, create a xxxx.bat file with notepad. You can add commands for each line to copy the file from where it is to the location you specify. It would be easier if the filenames and directories had some common namepart so you can use wildcard characters. You can also rename the files if needed. You can search "DOS batch file" for other commands or this one which came up in the search for a primer here. Learn how to do batch files and you are on your way to becoming a good programmer...

0
None
Noodle93

10 years ago

You use: COPY "C:\Target\Address\example.txt" "C:\New\Location\example.txt" I believe.