Link to home
Start Free TrialLog in
Avatar of victor2008
victor2008Flag for United States of America

asked on

How would I create a Robocopy script where I have several different sources and destinations? Whould it look somthing like this (where options and switches are at the end)?

How would I create a Robocopy script where I have several different sources and destinations?  Whould it look somthing like this (where options and switches are at the end):

Robocopy C:\SourceDir1 C:\DestDir1
Robocopy C:\SourceDir2 C:\DestDir2
Robocopy C:\SourceDir3 C:\DestDir3
Robocopy C:\SourceDir4 C:\DestDir4
/V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL
SOLUTION
Avatar of edster9999
edster9999
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of victor2008

ASKER

Thanks Ed.

Yes,  bottom line "/V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL " will stay the same but I have different sources and destinations.I didn't want to have to run several different commands or scripts.
would this work:
robocopy C:\SourceDir1 C:\DestDir1 /V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL
robocopy C:\SourceDir2 C:\DestDir2 /V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL
robocopy C:\SourceDir3 C:\DestDir3 /V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL
robocopy C:\SourceDir4 C:\DestDir4 /V /MIR /COPY:DAT /NP /LOG+:C:\temp\test.txt /R:0 /W:2 /FP /NDL
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial