How to change the last modified date, creation date, and last accessed date for files and folders

Posted on October 13, 2007 at 7:13 am

It’s amazing how many times you will find yourself in a situation where you have to change or modify the dates for a file or folder, such as the creation date, last modified date or the last accessed date! I’m not really going to wonder WHY anyone would need to do this, but based on my own experience, I have found it very handy in certain circumstances (ahem)!

Changing the date on a file is actually quite complicated if you try to do it yourself, but thankfully there are a few really nice freeware applications that can get the job done for you quickly and easily. I’m going to quickly go through three different apps each that do pretty much the same thing, but I’d rather mention more than less just in case one does not work for you.

FileDate Changer

This program works on Windows 95, 98, ME, NT, 2000, and XP. I’m not really sure if it’s going to work on Vista or not. I’ll see if I can find one that does! Anyway, it works without any installation and only needs Internet Explorer version 3 or above installed on the computer. Click Add Files, select the dates you want changed and click Change File Dates! Pretty simple. Note: Only works on files.

change file date

SetFileDate 2.0

This program has a prettier interface and allows you to multi-select from an explorer type interface rather than having to add files one by one. You can also change the dates of folders using SetFileDate. It’s very small and very easy to use!

change modified date

eXpress Timestamp Toucher

The difference between this program and the others is that eXpress TT allows you to change the date and time for a file or folders AND optionally all sub-folders. This can prove to be very useful if you need to change the date and time for all files and folders under a specific folder. You can change the creation time, modified time, and last access time.

timestamp changer

So there you have it, 3 ways you can go about changing the date and time on a file or folder! Hope it helps!

Oh I almost forgot, if you’re a Mac user, you can check out a program called A Better Finder Attributes that will allow you to change the date and time for a file, but it costs around $15! Know of something free, post a comment!

mac change file date

[tags]change file date, change last modified date, set file date time, change creation date[/tags]

» Filed Under Computer Tips

Related Posts

Comments

63 Responses to “How to change the last modified date, creation date, and last accessed date for files and folders”

  1. Shivaranjan said on :

    cool. Few days back I was in the same circumstances on how to change the time stamp of a file and did not have time to find out, now you have made my life easy. :mrgreen:


  2. akishore said on :

    No problem! Thanks for the comment. I’ll write another post about changing other file attributes also one day!


  3. OOOOOOOOOOR said on :

    You use “touch” for windows. :p


  4. Khaselstan said on :

    Doesn’t the last accessed date only show up when you look at a file’s properties?

    And…each time you look at a file’s properties that date becomes the last access date, no?


  5. akishore said on :

    Khaselstan,

    You’re pretty much right! Whenever you look at a file, the Last Accessed date changes to the current time. However, you can still change it, though I don’t think it’s terrible useful. Only Last Modified and Creation Date make sense.

    Thanks,

    Aseem


  6. Richard FDisk said on :

    I just wish m$ would have left it alone and used the FAT date system:
    1) “file date” = the date the file was last saved period.
    2) “file date” = “file date” no other “dates” assigned / available, not, when I got it, installed etc, or when I looked at/opened it but did not changed it,

    part of this bad behaviour started as far back as Excel 4,
    when I opened files the “A” archive attribute was always set again, I noticed that happening even if I didn’t save the file, just opening the file caused the attribute change.

    is there any way to turn this “NTFS” date stuff off, or is my only chance/hope a pile of FAT32 partitions for my data?
    since I usually work on “version” copies so that I can’t “Save” and destroy my work if the file gets corrupted in some way (which can happen a lot with Audio .wav files)
    these “NTFS” date things always screw me up and I usually have to open most or all of the versions of the file to find the right one, especially since the file size is no indicator of actual file size anymore either, because “Exploder” doesn’t show the actual byte count like a DOS “dir” command does. (at least I can do that but it’s an extra step that should be unnecessary)

    Thanks
    ◄RfD►


  7. Sven Lübke said on :

    I’m looking for a tool which COPIES the “creation date” to the “last changed date” of a file automatically for all files in a directory. Do you know a tool, which handles this task?

    Otherwise I have to write it on my own…


  8. kookster said on :

    Useful File Utilites allows you to set Modified to Created:

    replsoft.com


  9. Wolfgang said on :

    Thanks a lot – you made my job easier! I’ll change the filedates from time to time to recognize changes on an internet homepage image more easily.


  10. zeiss said on :

    i moved a bunch of folders to a new drive today, so on the new drive, the folder-modified dates are all today’s date. is there any easy way to auto-change the folder-modified date to the latest file-modified date within the folder? that date is, realistically, the last time the contents of the folder were changed, which is what i want with the folder-modified date.


  11. akishore said on :

    You should be able to use the above mentioned programs to modify the folder-modified dates to the last-modified date by plugging in that value manually and choose all of the folders in the directory.


  12. jb said on :

    I’ve been changing files dates/times for years (all the way back to DOS), but I have a situtaion now that I haven’t been able to find a utility to handle. I have a ton of files that we need to convert from old formats to new formats (i.e. Word 97 to Word 2007). Once we convert and save the files, we want to change the files back to their pre-conversion dates/times. Any suggestions?

    Thanks!


  13. akishore said on :

    JB, you should be able to use one of the programs above to change the date/times on an entire folder of files. You can either select an entire folder or select multiple files.


  14. jb said on :

    Ah, but the problem is the files don’t have the same date and time. I have over 10k files all with different dates and times (and scattered across tons of folders). Once we convert the files to their new formats, we want to set the date and time of the file BACK to its original last modified date (before conversion).


  15. Cindy said on :

    I am having a problem, I am not very computer literate, but when I go to check my last accessed times all the times on any file folders are marked the time my computer came out of hibernation, even folders I know I haven’t touched in days. I think someone has done this to my computer so that I can’t tell when they have accessed my files. Is there an application that can do that and if so how can I tell if it has been applied, and how can I remove it.


  16. akishore said on :

    JB – That’s a tough one! I really don’t know of a program that can record the original and then re-apply them! I don’t think many people do that because I have never seen a program like that. I will search and see if there’s anything I can find to help in your situation.


  17. jane said on :

    is there a FREE tool that will tell if a file date has been modified…also, i am in the same boat as JB above,need ORIGINAL file date BEFORE date conversion…thanks for any help you can provide…

    –jane


  18. Stevo said on :

    Is there any way to disable or remove any or all of these?, they must be taking up space and/or affecting the performance of Windows recording all of these for each file!


  19. Bill said on :

    Hey JB…

    Did you find a solution to your issue…

    I also have same problem…

    Years worth of photos moved to new hard drive and now I can sort the folders by date modified any more!


  20. jb said on :

    Bill,

    Nothing yet. I’ve been swamped at work and haven’t had a chance to try a couple of ideas. Something I thought might be possible is to put the date/time as part of the file name. Then do the conversions, then use the date/time section of the file name to change the file date/time back to what is was before the conversion. I have an old DOS utility (and maybe a couple of newer utilities that run in DOS) where I might be able to have all the file names (with the original date/time) listed in a text file and then pipe that text file through the utility to stamp the original date and time back on the converted file. Looks plausible on paper, but you know how that goes.


  21. Minhaz said on :

    i have one word file it created by bake dated and its file is modified by 8 may 2008 then again modified by 9th 10th 11th 12th may but need to access 8th may all contents without any modification can you help


  22. Clyde Peterson said on :

    I took a bunch of pictures last weekend and the year was wrong. Is there any way to batch all the pictures to only change the year and leave the rest of the information (time, day, month etc.)?


  23. James Hilton said on :

    Hi. I have a mac, and for reasons I would rather not say, I am afraid someone I live with has been accessing my files. I have found the computer time reset a couple of times (reset back to a random date a couple of years ago). I have changed it back. But I started thinking that perhaps this would mask when a file was opened? Can something as simply as changing a computer’s clock change the date accessed of the file?


  24. rainbird said on :

    I have a problem that is similar to jb’s, wondering if anyone can point me in the right direction. I’ve written a small backup app, which includes the option for full or incremental backups. To do this, the app resets the archive bit on files it copies. I don’t care about the dates attached to the backups, but I do not want the “modified by” dates to be changed on the original files when the app resets the archive bit.

    Any suggestions on how I would do this, programmatically (I’m working in VBA)? Most of the files being backed up are associated with M$ SharePoint sites, and as a result, every file in every site shows me as being the last person to modify the file. Note: I realize there are other ways to back up SharePoint sites; I don’t need that info. Long story, but this is the way I need to be backing up this data.

    Thanks in advance.


  25. Tim Smith said on :

    FileTouch can set the modified or created date/time to match the same file name in another folder. So if the user saving Word documents as a different version wants to keep the original dates, first copy the files to another folder. Save the files as the new Word doc, then use FileTouch to change the dates and times back.

    I’m currently working on a new version. So if you have any suggestions let me know soon.

    Tim

    It costs $7.97
    http://www.pcmag.com/article2/.....596,00.asp


  26. Bobo said on :

    Here is a very handy touch for Windows.

    http://www.codeproject.com/KB/.....h_win.aspx

    It just helped me with a problem similar to JB’s.

    1. I copied the structure to a new directory.
    2. Then I modified the files in the new structure.
    3. After that I used the dates from the original structure to set it on the modified files.


  27. askingJB said on :

    JB, how did you change the dates manually? i’m using win98.
    plus, i don’t want any apps to do it. i’m sure there’s a way to do it manually, maybe with regedit. but i can’t find any info online…

    anyone?


  28. RJP said on :

    Hi! I’m dealing with a known NT/2000/XP/Vista problem:

    I’m organizing my data using 2 different hard disks. When I move folders and files inside the same disk, Windows keeps original Creation Date. Good.

    But when I move from a disk to another and back, Windows applies current date! Annoying and stupid! It perverts the whole thing. Guess this is a NTFS default behaviour.

    (I’ve tried file commanders but found none able to do that)

    So I always have to RAR them and unRAR them to save original Creation Dates.

    Anyone knows a registry trick to correct this?


  29. DnD said on :

    I was just wondering if there is anyway that you can trace back the origional date once its been changed using these Freewares.

    Im talking useing any programs or devices to track the original date.

    Ty


  30. stephen84 said on :

    FileDate Changer works on Vista without a problem.


  31. Jack said on :

    Can’t u guys just roll the clock back and remake the file? that’s what i’ve been doing for ages. roll the clock back, create a new file that’s the same. change the clock. open it and it becomes modified. no need for programs


  32. Lars said on :

    On mac use the ‘touch’ command in a terminal window. With no parameters touch will change modification time to now, but uou can supply it a timestamp or reference another file. See ‘man touch’ for more.


  33. Ron said on :

    For anyone who is interested, here is the source to a c# console app that I wrote in about 5 minutes to recursively set the time on all files below a provided directory spec.

    The command line syntax can be obtained after compiling by running it as “touch -help”

    As a side benefit, for the msi building script I was writing, I had files from multiple roots that I wanted to set to the exact same time. The following batch file script did that:

    rem get the current time from touch
    for /f “delims=” %%v in (‘touch.exe’) do set NOW=%%v

    ECHO filetime is %NOW%
    touch files %NOW%
    touch XCAB %NOW%
    touch pmfiles %NOW%

    Here is the code. To use it, create a new project in visual studio of type C# console application with the name “touch”, and then cut and past the following replacing the contents of the progam.cs file it creates. C# is way cool for this, and makes it trivial to specify recursive, different filespecs etc.

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;

    namespace touch
    {
    class Program
    {
    static void Main(string[] args)
    {
    DateTime dt = DateTime.Now;

    if (args.Length == 0)
    {
    Console.WriteLine(String.Format(“\”{0}\”", dt.ToString()));
    return;
    }

    if (args[0].Contains(“?”) || args[0].Contains(“help”))
    {
    Console.WriteLine(“touch usage: \r\n touch -> no arguments returns current date time\r\ntouch path -> sets all files (recursively) under path to current time\r\ntouch sets all files in path to where time is any time format parseable”);
    return;
    }

    if (args.Length > 1)
    {
    DateTime.Parse(args[1]);
    }

    String FileSpec = args[0];

    DirectoryInfo di = new DirectoryInfo(FileSpec);

    FileInfo [] fi = di.GetFiles(“*.*”, SearchOption.AllDirectories);

    foreach (FileInfo file in fi)
    {
    file.CreationTime = dt;
    file.LastAccessTime = dt;
    file.LastWriteTime = dt;
    }

    Console.WriteLine(String.Format(“Changed File Time on {0} files”, fi.Length));
    }
    }
    }


  34. Jeff said on :

    Thanks for the code, Ron. Worked! -j


  35. Allan said on :

    Here is GUI tool to batch change dates
    http://www.file-utilities.com
    Many cool options


  36. Web development said on :

    Thanks a lot!

    eXpress Timestamp Toucher works great for me.


  37. GB said on :

    Hi There

    Quick question

    There are many ways to change the CREATED date for a file, so you will have created, modified, last accessed and even last printed date.

    This problem is:

    When you open the word document and you click on “file” and then “properties” this will open the properties tab, when you click on the “statistics” tab button, it still show the original created date ….

    How do one change THAT date on a document ???


  38. Ghibli said on :

    Very useful information, thank you! I just transferred some photos from my phone to my PC and they didn’t keep their original dates – a big inconvenience. But the problem was solved with your help, so thanks again :)


  39. Tiffany said on :

    Does anyone know if there is a way to figure out the previous dates accessed on files? I’m trying to see if particular photos were accessed on my memory stick, and I had the properties tab showing “Date Accessed”. When I tried to copy/paste all the information for all the files, all it did was copy/paste the pictures on my document and not the access date stamp. Now the entire memory stick has today’s date on it.


  40. Anthony said on :

    I recently got a new laptop with XP and transferred all of my videos to the new system. When I did so, it changed all of the creation dates to the transfer date, rather than when the file was actually created. I’d like to go back to the original creation date. The problem is, almost all of them are different (they are videos of my kids). I used to be able to look at the creation date and know how old the kids where when it was shot. Now I can’t. Can anyone help?


  41. Eric said on :

    I have a question concerning this issue of changing dates on files… I am a musician that submitted my master cd to a duplication plant… when I had gotten the cds back, they has some digital distortion in one of the songs. They checked it out and said it was on the master. So, They sent the disk back to me and indeed it was… but, I checked the file dates to be sure they weren’t pulling a fast one, and all of the files said that the last modified date was the current time. I check several other disks that I had burned for masters before that and it gave the time the cd was burn… not the current time… any possible shenanigans going on here?
    Thanks,
    Eric (Mac G5 OS 10.4.11/Toast 6)


  42. Don said on :

    For transferring files (with the complete directory structure) from one disk to another try http://www.cygwin.com. From the bash shell (similar to a DOS shell) the command to move directory A from disk G: to disk C: would be:
    cp -pr G:/path/A C:/path/
    where -p preserves the time date stamp and -r means recursive.

    Cygwin also has a touch command. From the shell prompt enter “man cp” or “man touch” for more help.


  43. Yutian said on :

    You forgot to put a link to the eXpress Timestamp Toucher program – http://www.irnis.net/soft/xtst/


  44. Debra Lopes said on :

    I am being accused of reading documents of another user on my system from a share on the server. I know I didn’t read it. If those documents are in my recent folder and with creation date of before they released me. Is there any where I can look in XP to see if the date and time was changed so the documents could have been created and backdated. On a stand alone system even though I backdated it and used one of my daughters files, the creation date in my profile if I open the document is the date she created it. But the date I created it in recent documents is the date that the date and time is set to when just right click on the document and going to the general properties tabs. PLEASE MY JOB OF 27 YEARS depends on proving those documents were placed there after I was relesed on admin leave. If they were smart enough to change the clock how do I prove that in XP.

    thanks Deb


  45. Bob Branham said on :

    I just returned from Europe – carried and used two digital cameras. On returning, I realized that the date on one camera was set two hours (time zone error) different than the other. I need to put the images in order of creation regardless of which camera they were shot on.

    Is there some way to change the time/date stamp by a fixed increment (i.e. “What it is now plus two hours”) rather than change it to an absolute date?


  46. wguru said on :

    This tip resolves 90% of this post’s issues: Cut-Paste retains the file/folder dates (date, aka date created and date modified). As for programs to change a file’s dates, nice to know, but the few times I ever needed to chg a date, I simply rolled back my pc’s time and date, simply copy-pasted the troublesome file and then restored my time and date.


  47. RedFlag1950 said on :

    Is it possible to identify the real date created if the author has changed or deleted it? If so, how can this be done?


  48. Hoera said on :

    These programs suck, because they don’t show the original date and time properties of a file so it is of no use. Looking for a (windows) program that shows the original metadata…


  49. Simon E said on :

    To Bob Branham,

    If you get hold of Adobe Lightroom you can change the Metadata values to +/- time or days/years.


  50. Bill said on :

    Hello guys! I know a thousand programs that could change these dates but what about hiding them. Can they be hidden or removed?


  51. N23 said on :

    My car stereo can read USB harddrives and playback MP3′s. This is great news, BUT it sorts the drive contents by date modified, not by name. This is obviously pretty annoying.

    I found a program called DriveSort that purports to resort the modified/created attributes to match an alpha sort, but it only half works. Can anyone recommend a program that’ll rewrite modified/created dates so they reflect alpha order?
    Thanks!


  52. AA said on :

    As a note, I tried SetFile Date 2.0 on a PDF file and while it changes the date for Windows (the date you see when browsing in Windows folders), it doesn’t change the Metadata value in the PDF file, and one of the metadata fields is the date! So when you go to File_Properties in Acrobat, you will see the real date that file was created.

    There’s a way around this: import the metadata from another PDF file created earlier, but this means finding a file that matches the data you want to set. Unless there are apps that will also change the metadata values of files containing metadata, GOOD LUCK.


  53. aj4 said on :

    Hi everyone. Newbie here. I have one situation need some explaination/guideline.

    Let say I install a trial software today (30th Jan 2010). After 2 months later, the software expired. Question: Does the freeware that u guys talking about works? (to go back the time which is 1st time install the trial software?) If it does, what kind of folder/exe file/extension file that i have to select?

    Thank you in advance.


  54. Elwin said on :

    On our website you can find utilities to change file date-time stamps, image-EXIF date stamps and even modify dates of doc/xml files. Utility can modify lots of properties and metadata – not only date-time type. AttributeMagic can bulk rename files (add date-time stamp to file name), can extract date-time from file name and much more.

    AttributeMagic.com


  55. AC said on :

    Hey,
    I was just wondering if you guys could help me out with a problem im having. I attend college, and needed to turn in a paper to my professor by 12 pm 3/19/10. I barely finished the paper today and was wondering if there is a way to change the email timestamp of my email server so it appears as if the email was sent on friday.


  56. DC said on :

    Im a complicated guy. Could you explain how to change them manually…? To quote you on 20th Oct 2007… (wow, that long ago)

    “Whenever you look at a file, the Last Accessed date changes to the current time. However, you can still change it, though I don’t think it’s terrible useful. Only Last Modified and Creation Date make sense. ”

    Its kinda useful to me to see who/what is accessing what…just make a script to scour the drive, and return filenames and paths to any folders that have been accessed between so and so a date, just so I know a particular someone is looking through my stuff…


  57. Gasss said on :

    Thank you very much!!! You helped me a lot and the programs are very easy. I’m using it to read manga on my PSP which automaticaly arranges the pictures by date modified and shuffles them up. I almost gave up…


  58. kathryne said on :

    I found some pictures on the hard drive back up we have. I was wondering how to tell when they were put on the hard drive. I was told he got them when somebody tried to hack his laptop – wireless – so he said he hacked them back and pulled stuff off their laptop to teach them a lesson….how is this possible? Is he lieing?


  59. Liz said on :

    A while ago some automatic updates changed the date format of my e-mail in outlook to the American format. I have tried to change it back to UK through the regional settings on my computer and the settings of my IP/web host. Their help team cannot see my problem and all suggestions have failed

    If I open in Fire fox it is OK. can you please tell me how to get my date back to UK using explorer as, appart from this being incredibly irritiating, it is leading to mistakes.

    Thanks

    Liz


  60. Astronomical-110 said on :

    Does Anyone know how to remove all the non-essential information on a file? including the owner of the file, date created, all the other useless details.

    The only information i need my file to have is the bare minimum, so you would not be able to tell anything more than its size, name and location on the hard drive


  61. EddyQ said on :

    Here is another way to change the date/time on a file to today’s date/time (a “touch” in Linux terms):

    copy this.ext+


  62. Jeanne said on :

    Wow! I used the first one and viola! I am thoroughly impressed!

    Thank you!


  63. Ben said on :

    I made a backup of a file I had and put it into a folder to prepare for backup to DVD. Problem is later on I accidentally double clicked (mouse has bad button and double clicked) when I only meant to highlight it and copy it to another folder for playback (cool video I wanted to watch). Problem is the backup was my ONLY copy on the computer, and double clicking the file in the backup folder changed its last accessed date and time! I wanted to back it up to DVD with the CORRECT date and time in ALL fields (created, last modified, last accessed). But now I don’t have the chance. Your program lets me change the date, but I don’t remember what it was SUPPOSED to be. Is there a trick in Windows to “revert” a file’s metadata (including all dates and times) back to a previous (and CORRECT) values?


Please post your comments/suggestions!