Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AppleMatt

macrumors 68000
Original poster
Mar 17, 2003
1,787
33
UK
Hi,

I can't seem to find a way to alter the creation date of a file. I have a project and mid-way through I copied everything into a new file to test something out. It's in a different format so it's impossible to simply port it back to the original file.

How can I alter the file properties to reflect the date I want? There must be a Terminal command to do it.

AppleMatt
 
Probably, google may be able to help.

I needed to adjust the date on a single file once, so I set the computer clock to the specific date and time, re-saved it, then changed the clock back.
 
Install the OSX Developer Tools (if you haven't got them you can download from developer.apple.com, create a free developer account if you need one). Then use the SetFile command line utility. You need to use the -d switch to set the creation date.
 
touch -t 200904211357 <filename>

-t is timestamp format is [[CC]YY]MMDDhhmm[.ss]

So Century, Year and seconds are optional
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.