Benches macOS

6

How to change the created date for a file?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I searched and found someone had asked this question last month, and an answer given was to try the site:

http://danilo.ariadoss.com/howto-change-date-modified-date-created-mac/

which I had previously found. However, when I follow the instructions I get a message stating "-bash: -t: command not found"

I have gone through this numerous times, always with the same result. Is it possible that the direction given are not valid for Snow Leopard?

Thanks for any help.

6 replies

Sign in or join Beachball Help to reply.

  1. 0

    f8lee

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    First, thanks to both of you for helping - I hadn't realized that the 'touch' was part of the command itself. However, when I type in:

    touch -t 0904131115/Users/RobertFately/Desktop/suttonallen/suttonallen.jpg

    to test the procedure (there is a jpeg file I made today named suttonallen inside a directory of the same name) I get this error message:

    touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]

    This happens if I use the full year (2009) or just the last two digits (09) as seen above. My thinking is that I am attempting to redate the "create date" to April 13th of this year with an arbitrary time of 11:15AM.

  2. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    the directions are valid. you are doing something wrong.

    start terminal.app. you will see a terminal window. paste the command as given in that link into that window ( DO NOT try to use any menus). it should look like something like this


    touch -t 200801120000 /path/to/file

    press enter in the terminal window.

  3. 0

    William Kucharski

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    What's the
    precise command string you're using?

    The error you're receiving seems to indicate you're missing something.

  4. 0

    f8lee

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    First, thanks to both of you for helping - I hadn't realized that the 'touch' was part of the command itself. However, when I type in:

    touch -t 0904131115/Users/RobertFately/Desktop/suttonallen/suttonallen.jpg

    to test the procedure (there is a jpeg file I made today named suttonallen inside a directory of the same name) I get this error message:

    touch: out of range or illegal time specification: [[CC]YY]MMDDhhmm[.SS]

    This happens if I use the full year (2009) or just the last two digits (09) as seen above. My thinking is that I am attempting to redate the "create date" to April 13th of this year with an arbitrary time of 11:15AM.

  5. 0

    dbsneddon

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    There should be a space between the "5" and "/Users..."

    Dave

  6. 0

    oslodude

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I also get the error message:

    touch: out of range or illegal time specification: [CC]YYMMDDhhmm
    http://.SS

    When I try to change a jpg file to the date it was taken (in 1872):

    touch -mt 187212240000 /Users/myname/Desktop/file.jpg

    If TOUCH is unable to edit the Date Created/modified to something older than (whatever the restriction), is there another way to get around the limitation? How about back-dating a file to July 4, 1776?

    Thanks!