Re: Sort folder list descending
Re: Sort folder list descending
- Subject: Re: Sort folder list descending
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 25 Mar 2010 16:33:05 -0400
Two things:
1. sort by modification date sorts in reverse chronological order,
newest first.
2. "reverse" is a property of the list, whose value is the reversed
list; it's not an action that modifies the list in place.
So if you want the items sorted oldest to newest:
set myItems to the reverse of (sort myItems by modification date)
and if you want newest to oldest:
set myItems to (sort myItems by modificatino date)
set myItems to (reverse sort myItems by modification date)
On Thu, Mar 25, 2010 at 4:07 PM, Alex Zavatone <email@hidden> wrote:
> Man, the AppleScript documentation is thick.
> I'm able to easily sort a list of folders but can't get the syntax to sort
> it in descending order. Anyone?
> tell application "Finder"
> set myItems to (sort myItems by modification date)
> Doing a reverse on the list after I get it doesn't appear to do anything. :
> /
> Thanks.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden