Use robocopy to copy files and preserve the timestamps
Added: 11/8/2022 7:00 PM
If you need to copy a bunch of files in Windows from one folder to another and preserve their original Created and Modified timestamps, here's how: robocopy C:\source D:\dest /DCOPY:T /COPYALL /E /R:0 /COPYALL: preserve the files' timestamps /DCOPY:T preserve original directories' timestamps /E: Copy directories recursively, including empty directories /R:0: do not retry locked files (the number of retries on failed copies default value is 1 million) This must be run from a command prompt with admin rights or else it will give a permissions error and fail to start. During the copy process, you may see the directories have the wrong timestamps, but once each directory's contents are finished copying, robocopy will update the directory's timestamp to match the original before moving to the next directory.