Re: Modification date in leopard
Re: Modification date in leopard
- Subject: Re: Modification date in leopard
- From: John Baltutis <email@hidden>
- Date: Sun, 2 Mar 2008 15:23:26 -0800
On 03/02/08, david <email@hidden> wrote:
>
> In 10.4 I could use
>
> set d to modification date of file "system:private:tmp:test"
>
> to get the modification date of a file. In 10.5 this doesn't work anymore.
> I guess I could use a shell script but that feels like a lot of hassle.
> There must be built in support for this in Applescript but Google didn't
> find anything.
I can't answer the question, directly. But, I just did these in 10.5.2.
This errors:
set p2s to "/private/tmp/<name of file>" as text
result
set d to modification date of (get info for file p2s)
result
-> tell current application
info for file "/private/tmp/<name of file>"
"File /private/tmp/<name of file> wasn't found."
Whereas, this works:
set p2s to "/private/tmp/<name of file>" as text
result
do shell script "cat " & p2s
result
l-> tell current application
do shell script "cat /private/tmp/cups_noproof_log"
"file's contents"
end tell
Maybe it's a permissions thing WRT things buried in /private/tmp/. However,
copy the file to the Desktop, and then the first works:
set p2s to ((path to desktop) & "<name of file>") as text
result
set d to modification date of (get info for file p2s)
result
->date "1/March/2008 3:21:58 PM"
Sounds like something for Sir Nebel toanswer.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden