Tuesday, December 31, 2019

Copy windows directory (folder tree) preserving the directory source time stamps

If you copy a folder in windows, you may notice that the newly copied (created) folders will have the timestamp when the copy was done (not the original timestamps from source). However, the files inside would have kept the original timestamps.

To have the folder (directory) timestamp as well to reflect the same as the source folder, do below in command line

Robocopy E:\Source\Dir1 D:\Dest\Dir1 /DCOPY:DAT /COPY:DAT /E /R:0


Note: If you already had copied the files using explorer, this will not copy the files again. It will check all and copy only if there is a newer file; plus (more importantly) will also update the destination folder with source folder time stamp. It ran much faster too as it didn't do any new copies... just had to set the timestamps

Tested in windows 10 version 1909

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...