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

Re: sort order


  • Subject: Re: sort order
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Wed, 29 Sep 2004 15:19:53 -0500


On Sep 29, 2004, at 10:10 AM, Preston Smith wrote:

Jaguar is missing the sort command for finder.

So is Panther.

When using Jaguar, can I assume that if I list all items in a folder that they will always come back in alphabetical (name) order?

Here's one way to do that:

on sorted_folder_listing(folder_)
local posix_path
local dss_result
set my posix_path to POSIX path of folder_
-- list all files and directories, case-insensitive sort:
set my dss_result to do shell script "/bin/ls -A " & my posix_path & " | /bin/sort -f"
set AppleScript's text item delimiters to {ASCII character 13}
return text items of my dss_result
end sorted_folder_listing


set a_folder to choose folder
sorted_folder_listing(a_folder)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: sort order
      • From: "Adam K. Wuellner" <email@hidden>
References: 
 >sort order (From: Preston Smith <email@hidden>)

  • Prev by Date: Re: sort order
  • Next by Date: Setting Input Volume
  • Previous by thread: Re: sort order
  • Next by thread: Re: sort order
  • Index(es):
    • Date
    • Thread