Re: Newbie: selecting newest file in a folder
Re: Newbie: selecting newest file in a folder
- Subject: Re: Newbie: selecting newest file in a folder
- From: Nigel Garvey <email@hidden>
- Date: Fri, 20 Apr 2001 12:45:52 +0100
Michelle Steiner wrote on Thu, 19 Apr 2001 09:47:12 -0700:
>
tell application "Finder"
>
set x to the selection as alias
>
set y to (files of x whose (modification date) ,
>
is greater than ((current date) - 1 * days)) as alias list
>
end tell
For those using a Mac OS version between 8.5 (I think) and 9.0.4, this
won't work because of the "'whose' clause with numerical comparisons"
bug. (It might even choke on 'as alias list'.) An alternative in this
case would be:
tell application "Finder"
set x to the selection as alias
set y to (item 1 of (sort files of x by modification date)) as alias
end tell
NG