Robocopy /xo with timestamp problems

Microsoft Windows
Post Reply
User avatar
MigrationUser
Posts: 336
Joined: 2021-Jul-12, 1:37 pm
Contact:

Robocopy /xo with timestamp problems

Post by MigrationUser »

17 Jan 2011 02:45
ww

Hi, I want to use robocopy to copy from one directory to another, but only files that have a newer date stamp in the source directory. I understand this is the default behavior, but I wrote out the switches explicitly just in case. Command line I am using is:

Code: Select all

robocopy "\\server1\SERVERsharename" "\\nas1\NASsharename" /COPYALL /R:2 /W:5 /E /XO /LOG+:"C:\Documents and Settings\me\Desktop\robocopy.log" /ZB /FP /TEE /X
I executed this command and it seemed to work fine.

Then I ran it again the next day, and it re-copied a huge number of the files that it copied the previous day. Those files had not been modified between yesterday and today, so the timestamps should have matched when I ran the command today.

Log file lists those re-copied files as "Newer". And indeed, when I look at the two files in Windows Explorer, often the timestamp *is* newer on the source, by a few seconds. (I see only 1-minute precision in Windows Explorer, so there may be more truly "newer" timestamps than I can see in Explorer.)

So my first question is, shouldn't the above command copy the filestamp from the source to the destination, after which they will be identical, and will not get recopied the next day? Am I doing something wrong?

Second, perhaps there is a way to have robocopy compare timestamps to 1-minute precision rather than 1-second or finer precision?

thank you

----------------------------

#2 17 Jan 2011 18:42
avery_larry


Use the /fft switch.
Post Reply