modification date change?

good morning,

Novice here. In case you can’t tell.

Can someone point me in the right direction as to a way to change the modification and creation date of a document from within an applescript, assuming it is possible of course.

thank you in adanvce,

dustin a bailey

This suggests how:

tell application "Finder"
	set f to (choose file) as alias
	set i to (info for f) -- if you want the old date
	set modification date of f to (current date) -- to set a new date
	info for f -- should show new date.
end tell

I thought I had tried something very similar but I will give it a try.

thank you for your time.

I do not believe that the creation date can be altered in any manner, unless you were to create a handler to copy the file, delete the original, and rename the copy with original filename.

Changing creation date

Thanks, Bruce, good thread. Amazing stuff. I was playing around with [touch] in Terminal today, however, and I could not get it to change any date except for the access date (which seems to only be visible in the Finder) regardless of the flags I set. I will look into the other commands discussed in the thread.

That was my next question. How to change the creation date. Everything i’ve read says that the cration date is read only but I thought there must be a way I know I have plenty of utility that can change either date at will.

My goal in all this is to modify the provided apple script that converts graphics to .jpgs when dropped in a folder. I have about 9 gigatybes of old archived images that I wouldn’t mind converting to .jpg to save space but I would prefer If I could keep their current date information so it doesn’t completly confuse me when I’m looking for images and suddenly everthing was modified yesterday.

What was this about handlers? The fies are being copied and resaved does that help anyway?

thanks again,

dustin