Page 1 of 1

copy script that gets sources and destination from textfile

Posted: 17 Jun 2008 03:59
by deheugden
i am not good in scripting but that doesnt mean that i dont wanne try batch.i need to copy data from 40 different users to a different place. i think the best way is importing the sources and destination from a textfile but i dont kno how. can some1 advice me or give me the code for doing that? the copying is going to be done with robocopy.
thanks.

Posted: 17 Jun 2008 05:24
by deheugden
btw, i do know a loop like this:
FOR /F "tokens=1" %%A IN (C:\sourcedata.txt) DO (copy %%A "\\backup\folder" )

but the source are multiple maps on different locations and i dont know how to do a loop when the source exists of multi different places