• 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: getting a file list in sorted order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting a file list in sorted order


  • Subject: Re: getting a file list in sorted order
  • From: Nigel Garvey <email@hidden>
  • Date: Sat, 17 Aug 2002 18:34:05 +0100

Jim Brandt wrote on Sat, 17 Aug 2002 06:38:33 -0500:

>I've got a script that for the most part works well for me. The one
>thing I don't like about it has to do with the order of a list that
>is generated by the command:
>
> set theList to every item of alias source1 whose file type is "TEXT"
>
>This list of aliases is not sorted alphabetically as the file list
>would be shown in a list view.

The Finder has a 'sort' command:

tell application "Finder"
set theList to sort (every item of alias source1 whose file type is
"TEXT") by name
end tell

This just returns a sorted list. Neither the files themselves nor the
view in the folder's window is affected.

NG
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: getting a file list in sorted order
      • From: Bill Briggs <email@hidden>
  • Prev by Date: Re: string question
  • Next by Date: Re: getting a file list in sorted order
  • Previous by thread: Re: getting a file list in sorted order
  • Next by thread: Re: getting a file list in sorted order
  • Index(es):
    • Date
    • Thread