Link to home
Start Free TrialLog in
Avatar of llarava
llaravaFlag for Afghanistan

asked on

Help needed with to script Robocopy

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%

Open in new window

Avatar of Shift-3
Shift-3
Flag of United States of America image

Have you named the script robocopy.bat, robocopy.cmd, or something else which matches the name of an existing command?  If so, rename it.
Try Syncback: has freeware version which is excellent: http://www.2brightsparks.com/freeware/freeware-hub.html

Avatar of llarava

ASKER

Shift-3:

No I haven't can please tell me why?
ASKER CERTIFIED SOLUTION
Avatar of Shift-3
Shift-3
Flag of United States of America 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 Ben Personick (Previously QCubed)
What OS is running on the Server?  2K, 2K3, 2K8?  2K8 R2?

If it is Windows 2000 or Windows 2003, what version of the support tools did you install?  Windows 2000 or Windows 2003?
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
Thanks for the points, glad I could be of assistance! =)