• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie: selecting newest file in a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Here's a strange one
  • Next by Date: Re: problem running apple guidebook modules
  • Previous by thread: Re: Newbie: selecting newest file in a folder
  • Next by thread: Re: Newbie: selecting newest file in a folder
  • Index(es):
    • Date
    • Thread