• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sort folder list descending
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Sort folder list descending (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: coerce record to string - does this work in other System languages?
  • Next by Date: Re: Sort folder list descending
  • Previous by thread: Sort folder list descending
  • Next by thread: Re: Sort folder list descending
  • Index(es):
    • Date
    • Thread