Quantcast
Channel: Harjs Blog
Viewing all articles
Browse latest Browse all 25

Robocopy copy date/time of folders

$
0
0
I use Robocopy for some of my backups (here). I hadn't realised that Robocopy doesn't copy the modified date/time of any folders it copies. This isn't a huge problem but I like to sort some of my files so I can see newly created folders. 

The simple fix is to add the 'copy directory timestamps' switch to the command. 
/DCOPY:T :: COPY Directory Timestamps. 

So the command
ROBOCOPY Q:\HarjHome M:\HarjHome /MIR /R:0 

changes to
ROBOCOPY Q:\HarjHome M:\HarjHome /MIR /R:0 /DCOPY:T

and all the timestamps on the copied folders are copied too.  There is a minor overhead in this but it's negligible.

Viewing all articles
Browse latest Browse all 25

Trending Articles