• 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: Sorting a list of aliases
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting a list of aliases


  • Subject: Re: Sorting a list of aliases
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 06 Dec 2010 08:18:05 -0600

On Dec 6, 2010, at 7:58 AM, Jim Brandt wrote:

Is there a way to ask Finder to return a list of contents of a folder such that the list is already sorted?

Currently I put in a command similar to:

tell application "Finder"
set sourceFolder to (folder of the front window) as text
set theList to contents of folder sourceFolder as alias
end tell

Try this ...

tell application "Finder"
set sourceFolder to (folder of the front window) as alias
set theList to (sort items of sourceFolder by name)
end tell


 _______________________________________________
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: 
 >Sorting a list of aliases (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: Given a POSIX Path...
  • Next by Date: Re: Given a POSIX Path...
  • Previous by thread: Sorting a list of aliases
  • Next by thread: Re: Sorting a list of aliases
  • Index(es):
    • Date
    • Thread