Batch, ASP, JScript, Kixtart, etc.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Posts: 1
- Joined: Thu Oct 14, 2010 2:24 am
I am trying to find a way to minimize this script. Below is 3 different lines that are I need to set up for 50 different locations. The path will be exactly the same for all 50 locations except for the server name is different for all of them. Is there an easy way to make this happen without having 150 different "start Robocopy" lines? Thanks!
Code: Select all
start Robocopy "JacksonVol5Sitedata" "JacSiteStudentSitedata" /B /SEC /MIR /R:5 /W:15 /LOG:JacLogfile1.txt /NFL /NDL
start Robocopy "JacksonVol5Appinst" "JacSiteStudentSitedataAppinst" /B /SEC /MIR /R:5 /W:15 /LOG:JacLogfile2.txt /NFL /NDL
start Robocopy "JacksonVol6userstudent" "JacUserStudent" /B /SEC /MIR /R:5 /W:15 /LOG:JacLogfile3.txt /NFL /NDL
- Posts: 13498
- Joined: Tue May 22, 2007 9:57 am
robocopy is not scripting it is just using the command line. When you put a string of commands in a file with extensions of BAT or CMD you are creating a command batch.
At a prompt type for /? which will list the help for the batch command FOR. There are examples in the help.