0

I am trying to move all files and directories and subdirectories including empty ones while preserving both creation and modified timestamps. I tried robocopy but it seems no matter what parameter I use, with /mov or /move some subfolder modified dates will not be preserved (any subfolder which is not empty).

what I ran to test:

robocopy C:\Users\Name\Desktop\test\source\ C:\Users\Name\Desktop\test\dest /mt /move /e /r:10 /COPY:DAT /DCOPY:DAT

test setup:

test\dest\
test\source\file 1.txt
test\source\file2.txt
test\source\folder1\subfolder 1\text.txt
test\source\folder1\subfolder 2\
test\source\folder2\

note that subfolder 1 gets a modified date at which the file it contains was moved. I guess this happens because robocopy handles the contents after it created the folder, but it doesn't come back to correct the modified date once all content has been copied into the subfolder.

how can I do this move while preserving all creation and modification datetimes on all folders subfolders and files?

2
  • Regular move should do it, and if the data is on the same drive, it should be instant too as it will only update the mbr.
    – LPChip
    Commented Mar 11 at 7:49
  • @LPChip The problem is that regular move so far seems to overwrite the modification date of sub-folders if they contain anything. I am looking for a way to preserve those modification dates as well, but guess we will arrive at a workaround outside of Robocopy itself, because I doubt Robocopy has any argument to do so. Commented Mar 12 at 18:44

0

You must log in to answer this question.

Browse other questions tagged .