Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I asked this on stackoverflow... but I think I should be asking it here: Is it possible to copy a file or a folder from one location to another without modifying its attribute data?

For example if I have a folder on a network drive and it was created on 2/3/2007 and I want to copy it to my c: drive .. but leave the date/time stamp as 2/3/ that possible?

share|improve this question

Robocopy. Has options to copy various attributes including timestamps

      ROBOCOPY source_folder destination_folder [file(s)_to_copy] [options]

   file(s)_to_copy : A list of files or a wildcard.
                          (defaults to copying *.*)

  Source options
                /S : Copy Subfolders
                /E : Copy Subfolders, including Empty Subfolders.
 /COPY:copyflag[s] : What to COPY (default is /COPY:DAT).
                      (copyflags : D=Data, A=Attributes, T=Timestamps).
                      (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
              /SEC : Copy files with SECurity (equivalent to /COPY:DATS).
          /DCOPY:T : Copy Directory Timestamps. ##
          /COPYALL : Copy ALL file info (equivalent to /COPY:DATSOU).
           /NOCOPY : Copy NO file info (useful with /PURGE)
share|improve this answer

rsync has the option "-t, --times" to preserve times.

share|improve this answer

Seeing as this was also tagged with C#:

You can copy a file and any attributes/timestamps you like along with it:

File.Copy(myFile, myNewFile);
File.SetCreationTime(myNewFile, File.GetCreationTime(myFile));
share|improve this answer

You can use Total Commander (ghishler). In setup utilities, copy, you can set copying folders to copy date and time. It works copying folder for c: to e: but copying for e: to desktop i had a problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.