Keeping the Date Modified the same when doing a copy


  • When copying a folder or files from one location to another location or to a different media, is it possible that the copied folder/files retain its original date modified rather than showing the date when it was copied.  Having the original date on the file and folder help when doing audit tracking. 
    Friday, February 10, 2012 8:21 PM


All replies

  • You're seeing the Modification Date on the files changed from a simple copy operation?

    For me, if I copy a tree of files/folders by for example drag and drop in Windows Explorer, the files DO retain their original Modification and Creation dates. 

    The folder Modification Dates always change because they're brand new, having just been created.  I don't know of any way to change that.


    Detailed how-to in my new eBook: Configure The Windows 7 "To Work" Options

    • Edited by Noel Carboni Friday, February 10, 2012 10:27 PM Added bolding for clarity
    • Proposed as answer by Niki HanModerator Monday, February 13, 2012 9:48 AM
    Friday, February 10, 2012 10:24 PM
  • There is an option in robocopy to copy those attributes.  Run help on robocopy (robocopy /?) and look for /COPY and /COPYALL options.

    Rich Prescott | Infrastructure Architect, Windows Engineer and PowerShell blogger | MCITP, MCTS, MCP

    Engineering Efficiency
    Windows System Administration tool
    AD User Creation tool

    • Marked as answer by Alvin C_ Monday, February 13, 2012 6:21 PM
    Saturday, February 11, 2012 1:45 AM
  • Hi,

    I am currently standing by for an update from you and would like to know how things are going.

    As far as I know, the Date modified won't change when doing a copy.


    TechNet Subscriber Support

    If you areTechNet Subscription user and have any feedback on our support quality, please send your feedback here.

    Niki Han

    TechNet Community Support

    Monday, February 13, 2012 9:49 AM
  • Thank you all for your responses.  It look like Robocopy or Robocopy GUI is the way to preserve the modified date.  I also was told that Microsoft also has another free utility called RichCopy that can do the same thing.
    Monday, February 13, 2012 6:20 PM
  • You ignored my question:  Are you seeing files copied in Explorer end up with changed Modification Dates?  That is atypical.  You should strive to understand why.


    Detailed how-to in my new eBook: Configure The Windows 7 "To Work" Options

    Monday, February 13, 2012 9:01 PM
  • Hi Noel,

    I didn't mean to ingored your question.  But yes the modication dates does get change when copying files from one location to another location.  As Rich suggested, using Robocopy can prevent this from happening and keep the original date stamp.


    Monday, February 13, 2012 9:33 PM
  • Let's be perfectly clear about this:

    You copy a folder full of files using Explorer, right?

    When you're done, all the files have altered modification dates?

    That doesn't happen on my Windows 7 system.  The dates on the folders do change - because the new folder structure had to be created.  But the dates on the files DON'T.

    Are you SURE you're looking at the Date modified field?

    Consider this sequence of screen grabs.  All I did was drag the files from the top to the bottom Explorer window, holding down the Control key (i.e., to copy).  Note that the dates in the Date modified column still say 2011 in the copied files.

    Before the copy - note the dates in the Date modified field.


    After the copy:

    After the copy.  Note the dates in the Date modified column still say 2011 in the newly copied files.


    Detailed how-to in my new eBook: Configure The Windows 7 "To Work" Options

    • Edited by Noel Carboni Monday, February 13, 2012 10:06 PM Added space between the images
    Monday, February 13, 2012 10:03 PM
  • Hi Noel,

    You are corrected.  The dates on the files within the folder doesn't change, but the date for the folders at the new location get changed.

    Thank You,


    Monday, February 13, 2012 10:28 PM
  • Hi Noel,

    I am observing that the "Modified" time doesn't change if the copy operation is within the same drive (say C:\Temp to C:\Temp). But, the "Modified" time is off by a second when I copy a file from the C: drive to a USB drive. Strange, but true.


    Warm Regards,


    • Edited by gaurahari Friday, July 20, 2012 1:51 PM emphasized some words
    Friday, July 20, 2012 1:48 PM
  • Found a tool on net which can Copy and Paste Data with Same Date and time. Seems a great option to retain old archives

    Monday, October 29, 2012 8:21 PM
  • I've read through the replies.  Another option is to use XCOPY which is already present in Windows.  Open a CMD window, then type:

    xcopy /?

    to see all the possibilities.  In this case, to preserve dates, you could use /x (copies file audit settings).  Use /e to also copy subdirs even if they are empty.  In my case, I browsed to the destination on my C drive, then used the following command to copy everything from my USB flash drive (which was called drive F):

    xcopy f:*.* /x /e

    That should do it!

    Tuesday, July 02, 2013 3:31 PM
  • I have tried this to be working on my Windows 8:

    Run a command prompt as administrator, Robocopy is already included in my Windows 8 build. The latest version has a /dcopy:T option which does the job -- copying folders while maintaining date modified. /e option copies all sub folders; /copyall option makes sure file property the same.

    robocopy M:\MP3 E:\MP3 /copyall /dcopy:T /e

    Tuesday, July 14, 2015 10:08 AM
  • I am having a similar issue.

    When items are moved from desktop to SD the modified date is changing.

    Friday, July 15, 2016 5:23 PM
  • Wrong. If you perform a cut paste from one folder to another on a different logical volume you will get new creation and new modified dates. Its really the fault of the programmers being lazy.
    Monday, December 19, 2016 6:26 AM
  • Nope. If you move files from one logical volume to another you will get new dates.
    Monday, December 19, 2016 6:28 AM
  • I agree with your observation. I have copied under many conditions and

    validated by "windiff"  half a million files 

     and I found that one of the copied files had a modification date enhanced by 1 second.  A usb was involved.

    It would be interesting to know why?   .... Stanley

    Tuesday, March 07, 2017 5:23 AM
  • thanks this worked just like you said.


    Thursday, December 28, 2017 7:49 PM
  • don't you have to be in a dos platform for this? How do you use robocopy in windows?



    Thursday, December 28, 2017 7:50 PM