Skip to content

Keeping timestamps and other attributes when copying or migrating data

This is mostly an issue related to the operating system in use, rather than Sunet Drive itself. When migrating data, you most likely want to keep the timestamps and other attributes of your data. Depending on your operating system, a normal file copy will either change the created date of a file, and/or the modified date of a file.

Windows

Use a command prompt to copy your files using robocopy, adjust the paths accordingly.

robocopy C:\some_directory D:\some_directory /DCOPY:T /COPYALL /E /R:0

The flag /COPYALL is equivalent to /COPY:DATSOU, which stands for data, attributes, timestamps, security, owner info, auditing info. In some cases there is no auditing info available for the file, then you would use /COPY:DATSO

Linux

On Linux, the following command will preserve the attributes:

cp -pr /source /destination

Mac

Using a Mac, you can always use the Linux solution in a terminal, but the alternative using the finder is: Command+Shift+Option+V, which is the shortcut for "Paste Item Exactly".