0

After using robocopy to copy files to a new drive I realized that all the files and directories creation times had been reset to the time of copying.
I now know that is standard for Microsoft. I have seen threads on this site detailing how to avoid this using the correct tags with Robocopy in the future.

For now, however, can robocopy (for example - c:/src d:/dest /AT) be used to just update the attributes and creation date and time on the copied files?
It would save an incredible amount of time as opposed to recopying all of the data.

2

/copy:t should copy just the timestamps. Keep in mind, however, that if they are very small files that copying just the timestamps may take longer than copying the entire file.

    robocopy c:\src c:\dest /copy:T

robocopy /help says

/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).
  • You can also easily test this on one file to confirm it does what you want. – Tony Hinkle Apr 16 '15 at 17:32
  • Thanks, Tony. I was wondering if anyone else had success with it or if I needed to seek another solution. Not at the computer in question right now. Trying one file first is an excellent idea and I will do that when I get back. – dkocian Apr 16 '15 at 18:27
  • Glad to help. I tested it by modifying a file at the target location and then running the command. The change made to the file was not affected, but it replaced the last modified timestamp with the timestamp from the source. So I didn't test it with the create timestamp, but it should work. – Tony Hinkle Apr 16 '15 at 18:30

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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