Re: Date Sort
Re: Date Sort
- Subject: Re: Date Sort
- From: Nigel Garvey <email@hidden>
- Date: Tue, 8 Feb 2005 14:09:30 +0000
David Langer wrote on Mon, 07 Feb 2005 06:23:51 -0500:
>I'm not a programmer, but wonder if there's a simple script available
>that can sort the contents of a folder by date? I'm using 10.3.7
It depends what you mean. You can't script the order of the contents
within the folder itself. You can arrange for the Finder to display the
contents in list view, arranged by either creation date or (more usually)
modification date. In OS X, the Finder's 'sort' command, which used to
return a sorted list of Finder references to a script, has yet to be
reimplemented; but there's has's library as previously mentioned, and my
own handler in ScriptBuilders:
< http://scriptbuilders.net/category.php?id=1910>
This can be either pasted into your own script or loaded into it, eg:
set FSort to (load script file ((path to scripts folder as Unicode
text) & "Libraries:FinderSort().scpt"))
tell application "Finder"
set itemRef to a reference to items of folder "Fred" of desktop
set sortedItems to FSort's FinderSort(itemRef, "modification date")
end tell
Sorts by "modification date" follow the Finder convention of latest to
earliest.
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden