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?
Take a look at the options for the
As per the
/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.
ROBOCOPY c:\src d:\dest /MIR /COPY:DT /DCOPY:T
Will copy all files and folders and preserve the date and time stamps.
ROBOCOPY c:\src d:\dest /MIR /COPY:DAT /DCOPY:T
Will copy all files and folders and preserve the date & time stamps and file attributes.
There is also another (and I believe deprecated?) switch
These were tested with ROBOCOPY 188.8.131.527 on Windows 7 x64 Ultimate.
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.