Computing.Net > Forums > Programming > batch file for file copying

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file for file copying

Reply to Message Icon

Name: hydeto
Date: January 20, 2006 at 11:52:50 Pacific
OS: win nt
CPU/Ram: p3
Comment:

Hi, May I know how can I write a batch file to copy multiple files(few thousand) from different raid drive and respective directory? I had the database of the whole list of respective file names and it's directory stored. I planned manually copy & paste all the files that I wish to copy out in the script file. And it will just copy all the files I want without me doing it one by one. Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: uli_glueck
Date: January 20, 2006 at 13:00:06 Pacific
Reply:

If you have stored the list with the files you want to copy
you can read it out with a for loop.
Please try it with echo if it reads out what it should before
you do copy. Evtl. you have to skip the first 2 lines.

@echo off
setlocal
set source=your list
set target=your destination folder
for /f %%a in ('type %source%') do xcopy %%a %target%
endlocal
:EOF

hope this helps
uli


0

Response Number 2
Name: uli_glueck
Date: January 20, 2006 at 13:05:45 Pacific
Reply:

Oh, I didn“t read you post carefully. Different raid drives
and respective directories might make it a bit complicated.
You might have to filter with find and need a few if
statements. Depends on your list.

uli


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Outlook Macro: Moving Mes... C++ program



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file for file copying

Batch file FOR LOOP www.computing.net/answers/programming/batch-file-for-loop/11504.html

batch file copy without overwrite www.computing.net/answers/programming/batch-file-copy-without-overwrite/12885.html

Copy and Rename Batch File www.computing.net/answers/programming/copy-and-rename-batch-file/15297.html