• 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: newest file in a folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newest file in a folder


  • Subject: Re: newest file in a folder
  • From: John McAdams <email@hidden>
  • Date: Sun, 17 Dec 2000 21:13:10 -0500

>tell application "Finder"
> set newFileAlias to (item 1 of (sort every file of myFolder by
>modification date)) as alias
>end tell


One line! That's the cleanest so far. To get the "last file by date"
change it to:

set newFileAlias to (item 1 of (the reverse of (sort every folder of
x by modification date))) as alias

jmc
--
John McAdams
email@hidden


  • Follow-Ups:
    • Re: newest file in a folder
      • From: Jason Bourque <email@hidden>
References: 
 >Re: newest file in a folder (From: Nigel Garvey <email@hidden>)

  • Prev by Date: Re: newest file in a folder
  • Next by Date: Re: newest file in a folder
  • Previous by thread: Re: newest file in a folder
  • Next by thread: Re: newest file in a folder
  • Index(es):
    • Date
    • Thread