• 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 Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort Problem


  • Subject: Re: Sort Problem
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 22 Aug 2009 18:28:40 -0500

I tried this ...

set fileList to sort (files of folderAlias whose name extension is not "") by modification date

and found that it does work. Apparently, 'sort' needs the whose phrase and is confused when it's not there. But there is a better solution ...

tell application "Finder"
files of folderAlias
set fileList to (sort the result by modification date) -- item 1 is most recent
end tell

Which indicates that the problem lies elsewhere.
(And, this is why I don't like one-liners!)

On Aug 22, 2009, at 4:48 PM, Michelle Steiner wrote:

On Aug 22, 2009, at 2:16 PM, Luther Fuller wrote:

Does anyone know why I get this error?

I don't know why the error happens, but I get the same error.

Also, when I include the "whose" clause I get the list in reverse order, newest first.  If I specify by name, though, then it is in alphabetical order, and by size is increasing size.

-- Michelle

 _______________________________________________
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

  • Follow-Ups:
    • Re: Sort Problem
      • From: "email@hidden" <email@hidden>
References: 
 >Sort Problem (From: Luther Fuller <email@hidden>)
 >Re: Sort Problem (From: Michelle Steiner <email@hidden>)

  • Prev by Date: [Plug] MacScripter.net is ten years old
  • Next by Date: Re: Sort Problem
  • Previous by thread: Re: Sort Problem
  • Next by thread: Re: Sort Problem
  • Index(es):
    • Date
    • Thread