Avatar of nav2567
nav2567
Flag for United States of America asked on

Robocopy parameters.

Hello,

I need to create two bat jobs to run robo copy between two file shares.  

The first job will run every hour to copy differential data from Mon to Thursday.  The second job will run on Friday to mirror data.

Can someone advise the parameters I should use?  I would like to try the below but not sure if any parameter(s) should be added also.  

Thanks.

Hourly differential job
ROBOCOPY \\sourceserver\share \\destserver\share /s /e /xo

Weekly Miirror job
ROBOCOPY \\sourceserver\share \\destserver\share /s /e /mir
Windows Server 2008Windows Server 2012

Avatar of undefined
Last Comment
Patrick Bogers

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Patrick Bogers

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
nav2567

ASKER
Thanks.  So, Robocopy \\SourceServer\Share \\DestinationServer\Share /e will copy only differential by default?
Shaun Vermaak

Always include /XO so that if destination is updated, source do not overwrite it
Patrick Bogers

Yes.

Shaun, why exclude older files(/xo)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SOLUTION
Shaun Vermaak

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Patrick Bogers

Ahhh ok i get it. Right can be modified and should replicate from right to left during the mirror. Nice! Didnt think of that.