Re: File age
Re: File age
- Subject: Re: File age
- From: Andrew Oliver <email@hidden>
- Date: Sun, 11 Jan 2004 00:30:32 -0800
Calcualating a file age is simple to do with AppleScript:
set theFile to (choose file)
set mod_date to modification date of (info for theFile)
set file_age to ((current date) - mod_date) / days
display dialog "File is " & file_age & " days old"
On 1/11/04 12:16 AM, "Mark Moorcroft" <email@hidden> wrote:
>
I am in the process of writing a software update management script kit.
>
Part of this process requires me to calculate the age of a file. There
>
are no tools in any of the shells I can find and the Perl modules to do
>
this are also absent from OSX.2 and OSX.3 from what I can gather. I am
>
open to suggestions on the best way to accomplish this. Obviously since
>
I am posting to an Applescript list I expect suggestions for doing it
>
with Applescript, but anything would be helpful. Date math seems to be
>
a real pain in general. I hesitate to install the Perl modules because
>
this script kit needs to function on a vanilla OSX install.
>
>
Totally unrelated question...
>
>
I got a message on this list today from email@hidden today. The
>
mail header appears in Mail.app with an icon where you might expect to
>
see his picture. I can find nothing in the raw message source to
>
explain this, and he is not in my address book. I love a mystery ;-)
>
>
>
>
From a despair.com calendar my good friend gives me every year...
>
>
A few harmless flakes working together can
>
unleash an avalanche of destruction.
>
>
--MM
>
>
[demime 0.98b removed an attachment of type application/pkcs7-signature which
>
had a name of smime.p7s]
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >File age (From: Mark Moorcroft <email@hidden>) |