10

When you're copying a folder with subfolders in Windows 7 file explorer (and possibly in earlier versions of Windows) all subfolders get their "date created" and "date modified" changed to the current time and date. (Files are unaffected.)

This is annoying because I use these values for sorting and I would like them (or at the very least one of them) to be preserved when copying folders. Any suggestions?

2 Answers 2

7

Robocopy should be up to the task. The Default copy flags are DAT (data, attributes and timestamp) so that should work.

As noted in the comments, the OP used the specific flags of

robocopy /E /DCOPY:T
2
  • 1
    robocopy /E /DCOPY:T does what I want. I will still keep this question open for a while in case there are other suggestions (including possibly ones that will make the Windows file explorer do this.)
    – nitro2k01
    Nov 17, 2011 at 16:15
  • Note to self: I will need to test how robocopy works with copy actions that require UAC authorization.
    – nitro2k01
    Nov 17, 2011 at 16:25
3

Another option is to zip the directory, copy the zip and unzip it.

Works well if you have not that many files.

Tested it with the build-in zip functionality in Windows 10.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .