Question

So I am looking for a nice batch file using the robocopy function to make a copy of my Win7 client machines Backup and Restore folders to a NAS. Each day a new folder is created in a backup set parent folder, so in theory, all I want robocopy to do is copy that new folder every night rather then the entire directory every night.

As of now - I am using robocopy /MIR but it still copies everything across each time as OLDER even though the folders haven't changed.

Any ideas how this can be done?

Cheers

Was it helpful?

Solution

Use the /XO option.

/XO : eXclude Older - if the destination file exists and is the same date
                      or newer than the source - don’t bother to overwrite it.

Another option would be to use the /MaxAge:1 option.

/MAXAGE:n : MAXimum file AGE - exclude files older than n days/date.

RoboCopy /?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top