Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Help needed with to script Robocopy

Avatar of llarava
llaravaFlag for Afghanistan asked on
Storage SoftwareWindows BatchVB Script
7 Comments1 Solution752 ViewsLast Modified:
Hi,

I have two USB disk attached to a server. I have copied all the data from disk E: to disk F: I want now to setup Robocopy in order to run diferential copies from E: to F:

The goal would be to use a batch or vbs to run robocopy and the right switches in order to copy all the changes.  Once I have the script I will run a scheduled task.

I have found the following script but it does not work.  am getting following output on my console which is repeating continously:

Maximum setlocal recursion level reached.

Could someone help me out.

Thank you.

@ECHO OFF
SETLOCAL
 
SET _source=E:\
 
SET _dest=F:\
 
SET _what=/COPYALL /B /SEC /MIR
:: /COPYALL :: COPY ALL file info
:: /B :: copy files in Backup mode.
:: /SEC :: copy files with SECurity
:: /MIR :: MIRror a directory tree
 
SET _options=/R:0 /W:0 /LOG:MyLogfile.txt /NFL /NDL
:: /R:n :: number of Retries
:: /W:n :: Wait time between retries
:: /LOG :: Output log file
:: /NFL :: No file logging
:: /NDL :: No dir logging
 
ROBOCOPY %_source% %_dest% %_what% %_options%
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3Flag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answers