Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After using robocopy to copy files to a new drive I realized that all the file and directory creation times and been reset to the time of copying.

Are there some switches to make robocopy keep the original files times?

share|improve this question
up vote 23 down vote accepted

Take a look at the options for the /COPY:[copyflags] and /DCOPY switches.

As per the ROBOCOPY /? usage info:

/COPY:copyflag[s] :: what to COPY for files (default is /COPY:DAT).
                      (copyflags : D=Data, A=Attributes, T=Timestamps).
                      (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

/DCOPY:T :: COPY Directory Timestamps.

For example:

ROBOCOPY c:\src d:\dest /MIR /COPY:DT /DCOPY:T

Will copy all files and folders and preserve the date and time stamps.


Will copy all files and folders and preserve the date & time stamps and file attributes.

There is also another (and I believe deprecated?) switch /TIMFIX which does much the same as /COPY:DT but it doesn't fix the time stamps on folders.

These were tested with ROBOCOPY on Windows 7 x64 Ultimate.

Be aware that the /MIR switch mirrors the directory that you are copying to; that is it will also delete files not found on the source folder.

share|improve this answer
How do you see your Robo version? – Pacerier Apr 25 '15 at 6:46
@Pacerier Right-click -> Properties -> Details tab on the executable which is normally located at C:\Windows\System32\Robocopy.exe – Kev Apr 25 '15 at 13:15
Not possible I'm on UEFI cmd X:\Windows\System32\Robocopy.exe. Is there a cmd way to do it? – Pacerier Apr 25 '15 at 15:12
@Pacerier - I don't know what you mean by "Not possible I'm on UEFI", can you explain? – Kev Apr 25 '15 at 15:25
@Pacerier one of these methods might help:… – Kev Apr 25 '15 at 15:30

robocopy F:\ E:\ /E /v /S /COPY:DAT /DCOPY:T /R:2 /W:0 /NP > C:\teste\logbackup20141206.txt

To Copy all content from drive F: to drive E: I use the command above.

share|improve this answer
First, this has been answered 4 years ago. Second, this answer leaves much room for improvement. Better explain what those switches do. – Sven Dec 6 '14 at 21:46

Your Answer


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.