Re: newest file in a folder
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