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?