Re: newest file in a folder
Re: newest file in a folder
- Subject: Re: newest file in a folder
- From: g3pb <email@hidden>
- Date: Sun, 17 Dec 2000 14:31:49 -0900
-- this should do it, note you will need to change the destination folder
tell application "Finder"
set numItems to count of items in alias "iMac:Desktop Folder:AMA:"
if numItems is not 1 then
set aList to every item in alias "iMac:Desktop Folder:AMA:" as alias
list
else
set a to {every item in alias "iMac:Desktop Folder:AMA:" as alias}
end if
set latestFile to modification date of item 1 in aList
repeat with anItem in aList
if modification date of anItem > latestFile then
set latestFile to modification date of anItem
end if
end repeat
end tell
-- hcir
mailto:email@hidden
>
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.)