Copying folders in Windows 7 without changing created/modified date?

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?


Solution 1:

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

Solution 2:

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.