Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to change the created date for a file?

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.

24" iMac 3.06GHz, Mac OS X (10.6.2), 23" Cinema Display

Posted on Nov 23, 2009 8:47 PM

Reply
Question marked as Best reply

Posted on Nov 23, 2009 8:51 PM

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.
5 replies
Question marked as Best reply

Nov 23, 2009 8:51 PM in response to f8lee

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.

Nov 23, 2009 10:58 PM in response to Dogcow-Moof

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.

Dec 13, 2009 6:44 PM in response to f8lee

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!

How to change the created date for a file?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.