Is There a Way to Keep Folder Creation Times When Using AzCopy?

September 3, 2025 4 answers
Asked by !faultDip35
I'm currently trying to transfer a bunch of files and folders from one Azure file share to another using AzCopy. I'm running the command: `./azcopy copy 'https://mystorageaccount.file.core.windows.net/files1/*' 'https://mystorageaccount.file.core.windows.net/files2' --recursive --preserve-info=true --preserve-permissions=true` which does a great job of preserving the last modified time for files, but it seems to neglect the creation time for folders. Is there a way to retain those folder creation times with AzCopy? Also, if I were to use Robocopy, would that mean I need to download and re-upload all the files? What's the best approach to transfer a large set of files while keeping as much metadata intact as possible?

Answers

old fashioned manners
Have you tried using `--preserve-smb-info`? That might help with your issue since itโ€™s supposed to handle and preserve more metadata. Just make sure you're on the latest version of AzCopy as sometimes features can change.

!faultDip35: That sounds like it could be useful! But I've read that itโ€™s similar to `--preserve-info`, right? Iโ€™m not sure if itโ€™ll solve my folder creation time conundrum.

Reply to this answer
!good rehearsal
Another approach could be to run AzCopy first to copy everything over, and then follow it up with Robocopy using the `/e /timfix /dcopy:t` options to fix the timestamps afterwards. It might be a bit of a workaround, but it could save you some hassle in the long run.

!faultDip35: That sounds like a good strategy! I think Iโ€™ll try that method, thanks for the tip!

Reply to this answer
Tinkerly
I've definitely faced similar struggles when moving large batches of files. In my case, I had to deal with virtual data rooms, and preserving the folder structure was a real headache. I even created a tool called EZFolders to help manage consistent structures. Itโ€™s a different situation than AzCopy, but Iโ€™d love to know if anyone has found a reliable way to keep folder creation times intact while using AzCopy versus just relying on Robocopy, which, as you mentioned, has some overhead with downloads.
Reply to this answer
6-8-meter
Unfortunately, AzCopy does have some limitations when it comes to preserving metadata, especially for Azure Files, since it relies on the FileREST API. If you're looking for a more reliable sync method, Robocopy with data plane access would be a solid choice.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions