Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

up vote 16 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.

share|improve this answer
How do you see your Robo version? – Pacerier Apr 25 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 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 at 15:12
@Pacerier - I don't know what you mean by "Not possible I'm on UEFI", can you explain? – Kev Apr 25 at 15:25
@Pacerier one of these methods might help:… – Kev Apr 25 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.