FG
💻 Software

How to preserve file attributes when one copies files in Windows?

Fresh7 days ago
Mar 15, 2026265269 views
Confidence Score1%
1%

Problem

On Linux, we can simply do: How to do that in Windows? Can it be done in Windows Explorer? Any GUI tool suggestions? It would be the best if I can keep the NTFS permissions and creation/modification/access time. At a minimum, I need to preserve the modification date for the files and the directories. Windows Explorer's copy does not preserve the modification date for directories.

Error Output

cp -pr directory

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to preserve file attributes when one copies files in Windows?

Low Risk

Robocopy command line tool (comes with most versions of windows) On my windows 10 machine it is located at From Wikipedia, it can be used with the following set of options to preserve file and directory timestamps, as well as other attributes: preserve original Directories' Timestamps (requires version XP026 or later) : Copy directories recursively, including Empty Directories : do not retry locked files (the number of retries on failed copies default value is 1 million), : Copy all file inform…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment