• 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: Neat strategies for sorting a list of files alphabetically by name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Neat strategies for sorting a list of files alphabetically by name


  • Subject: Re: Neat strategies for sorting a list of files alphabetically by name
  • From: Brennan <email@hidden>
  • Date: Mon, 14 Mar 2005 11:02:19 +0100

On 11/3/05 at 15:07, Barry Wainwright <email@hidden> wrote:

> On 11/3/05 3:01 pm, "Brennan" <email@hidden> wrote:
>
> > Given that these files sort perfectly in alphabetical order,
> > is there a good approach for sorting them without writing a
> > full blown sort routine? Is there perhaps a shell command I
> > can use?
>
>
> On open (theFiles)
> Tell app "finder" to Set nameList to name of theFiles
> Set applescript's text item delimiters to {ascii character 10}
> Set sortedNBameList to paragraphs of Do shell script "echo " & ¬
>     quoted form of (namelist as text) & "|sort"
> End open

Looks good, but "Finder" wont give me 'name of theFiles' (it's just a list
of aliases that gets fed to 'open').

If I have to iterate through them to get their names, I might as well
perform my own sort. :(

Conceivably I could assume that 'selection of app "Finder"' will contain a
list of the same files as received by 'open', but I fear that this may not
always work. Can I rely on this?

(See my other post about the Finder selection).

Any other ideas?

Brennan
 _______________________________________________
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: 
 >Re: Neat strategies for sorting a list of files alphabetically by name (From: Barry Wainwright <email@hidden>)

  • Prev by Date: Re: Found records count in Filemaker 6/OS X
  • Next by Date: Finder selection
  • Previous by thread: Re: Neat strategies for sorting a list of files alphabetically by name
  • Next by thread: Re: Neat strategies for sorting a list of files alphabetically by name
  • Index(es):
    • Date
    • Thread