Re: newest file in a folder
Re: newest file in a folder
- Subject: Re: newest file in a folder
- From: Nigel Garvey <email@hidden>
- Date: Mon, 18 Dec 2000 01:32:27 +0000
=?iso-8859-1?Q?H=E5vard?= wrote on Sun, 17 Dec 2000 23:19:14 +0100:
>
What is the clean and easy way to get an alias to the newest file of
>
a folder? (the one with the newest modification date.)
>
>
if I
>
tell app "Finder" to get first file of myFolder
>
--> first file by name.
>
How do I get "last file by date"?
tell application "Finder"
set newFileAlias to (item 1 of (sort every file of myFolder by
modification date)) as alias
end tell
NG