Re: sort order
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
References: | |
| >sort order (From: Preston Smith <email@hidden>) |