Re: Set File Creation date
Re: Set File Creation date
- Subject: Re: Set File Creation date
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 17 Dec 2004 23:25:20 -0800
On 12/17/04 10:54 PM, "Gnarlodious" <email@hidden> wrote:
> Is there any way to set a file's creation date?
>
> This runs:
> tell application "Finder" to set the creation date of (info for someFile) to
> date "Thursday, December 2, 2004 11:28:16 PM"
>
> but doesn't do anything.
First of all, someFile already has a 'creation date' property in the Finder
- no need for an info for - but it's denoted as [r/o]. So you wouldn't be
able set it in the Finder.
The result of (info for) is a record 'file information' of which every
single property is r/o - even properties whose equivalents as file
properties can be set in the Finder, let alone ones that can't. It's just a
way of getting info for the file. You can't set _any_ property of (info for
someFile), Finder tell block or not. That was never going to work.
'creation date' tells you when a file was created. It can't be modified.
Make a duplicate and delete the original.
You can use 'read' to read the file, write the result to a new file opened
for access, get the original's file type and creator type if any, rm the
original, rename the new file to the original's file name and give it file
and creator types in the Finder. Its creation date will be whenever you
created the new file.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden