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

Sorting a list of aliases


  • Subject: Sorting a list of aliases
  • From: Jim Brandt <email@hidden>
  • Date: Mon, 6 Dec 2010 07:58:46 -0600

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

and then sort theList using a variation of a BubbleSort. The problem is this method is hiddiously slow when there is more than a few files in the folder.

I didn't time it but the sort for a folder of 139 files took over two minutes. I need something faster!

TIA,

Jim Brandt

 _______________________________________________
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: Sorting a list of aliases
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Finder error problem?
  • Next by Date: Re: Given a POSIX Path...
  • Previous by thread: Re: Finder error problem?
  • Next by thread: Re: Sorting a list of aliases
  • Index(es):
    • Date
    • Thread