Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to use ROBOCOPY to mirror a directory, but ignore the sources timestamps? I've tried the following:

robocopy \source\folder \destination\folder /MT:16 /PURGE /COPY:D /E

But once I press enter, the summary screen shows the options as:

Options : * . * /S /E /COPY:DT /PURGE /MT:16 /R:1000000 /W:30

How can I mirror two directories, but ignore timestamps from the source when the files are copied over?

Thanks for any insight!

share|improve this question
add comment

1 Answer

If you don't want files changed on either the original or destination side to be overwritten in the destination combine the two options /XO /XN. New files on the original side and files deleted on the destination side will still be added to the destination folder. And, deletions on the original side will also carry over to the destination.

Using only the option /XO will allow changes made to original folder files to overwrite changed destination files. But changes in the destination will stick if there is an older file in the original folder. Those changes will be overwritten if the original side is later changed.

Robocopy has a long list of options that you may find helpful. To create a reference file run:

robocopy /? >robocopy_usage.txt

share|improve this answer
    
Thanks for trying, but your answer is somewhat cryptic and doesn't actually answer anything. Essentially I want to mirror the source to the destination, but when a file is brought over from the source, it uses the current time (i.e. the time the file is written to the destination), not the timestamp on the source file. –  heyjon Feb 28 '13 at 21:33
    
Ah, I misunderstood 'ignore the timestamps' to mean don't use the timestamp to determine what to move to the destination. I use the default option /copy:dat to get what you want. –  Brad S Mar 1 '13 at 5:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.