🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15239

Re: Sorting File[] in Alphabetical Order

#15239
From: Jonathan
Date: Fri, 25 Jun 1999 00:00
124 lines
4543 bytes
Well I do want to see an ordered list of files and directories, and so I
guess it is really a file[],

so how would I cheat what is the shell command to help me, I am using
Windows NT

thanks,

Jonathan



Rich Wilkman wrote in message <3773A32E.649ED14@inprise.com>...
>Jonathan:
>
>State the problem, I guess.  What are the parameters for the problem?
>Int'l order needed?  Is it really File[]?
>
>Personally, I'd cheat.  Determine the OS and exec a shell command that
>gives me an ordered listing of the files.  I could do that for Wintel
>and for *nix systems; that wouldn't work on the mac.
>
>Never re-invent the wheel <g>.
>
>-Rich
>
>Jonathan wrote:
>>
>> How would you solve this problem?
>>
>> Rich Wilkman wrote in message <377260AB.3E786F93@inprise.com>...
>> >Jonathan:
>> >
>> >I was just curious; good cross-language sorts are one of those "academic
>> >interest" things for me.  I think Tor has a good track on this one for
>> >you, though.  Sorting itself winds down to choosing the algorithm
>> >appropriate for the set of items (size, etc.) in question.  Binary trees
>> >or divide-and-conquer algorithms are good, but probably not appropriate
>> >for a set of 10 items, for example.  Linear (O)n pass mechanism on a
>> >million items would be just as wrong.  I was curious to see / hear how
>> >you had solved this particular problem.
>> >
>> >-Rich
>> >
>> >Jonathan wrote:
>> >>
>> >> good point, I also found it very slow,
>> >>
>> >> How does Windows explorer sort so fast,
>> >>
>> >> Do you have any suggestions,
>> >>
>> >> help appreciated
>> >>
>> >> Jonathan
>> >>
>> >> Rich Wilkman wrote in message <3770FF2A.E30D62D7@inprise.com>...
>> >> >Jonathan:
>> >> >
>> >> >Is your solution good for more then English character ordering?
>> >> >
>> >> >-Rich
>> >> >
>> >> >Jonathan wrote:
>> >> >>
>> >> >> Don't worry I figured this one out
>> >> >>
>> >> >> Arrays.sort(<object[]>)
>> >> >> Jonathan wrote in message <7kqbl0$9h78@forums.borland.com>...
>> >> >> >Does anyone know of a quick way of sorting File[] into
Alphabetical
>> >> order
>> >> >> >
>> >> >> >any help appreciated
>> >> >> >
>> >> >> >
>> >> >> >Jonathan
>> >> >> >
>> >> >> >
>> >> >
>> >> >--
>> >> >
>> >> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> >> >Rich Wilkman
>> >> >Senior Quality Assurance Engineer
>> >> >Borland JBuilder Team
>> >> >
>> >> >If you see something that looks like an opinion up there,
>> >> >it's mine and mine alone.
>> >> >
>> >> >Mail sent to me from the newsgroups won't bounce but will
>> >> >be ignored.  If I have time, I'll respond, but you  have
>> >> >a better chance if you confine your posts to the newsgroups
>> >> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> >
>> >--
>> >
>> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> >Rich Wilkman
>> >Senior Quality Assurance Engineer
>> >Borland JBuilder Team
>> >
>> >If you see something that looks like an opinion up there,
>> >it's mine and mine alone.
>> >
>> >Mail sent to me from the newsgroups won't bounce but will
>> >be ignored.  If I have time, I'll respond, but you  have
>> >a better chance if you confine your posts to the newsgroups
>> >=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>--
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Rich Wilkman
>Senior Quality Assurance Engineer
>Borland JBuilder Team
>
>If you see something that looks like an opinion up there,
>it's mine and mine alone.
>
>Mail sent to me from the newsgroups won't bounce but will
>be ignored.  If I have time, I'll respond, but you  have
>a better chance if you confine your posts to the newsgroups
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <7l085p$fha17@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7kqbl0$9h78@forums.borland.com> <7kqh48$a242@forums.borland.com> <3770FF2A.E30D62D7@inprise.com> <7kso7p$c276@forums.borland.com> <377260AB.3E786F93@inprise.com> <7kvddo$eei15@forums.borland.com> <3773A32E.649ED14@inprise.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9f550f2ec47eab87
X-Google-Attributes: gidf74b3,public
From: "Jonathan" <plaskowj@logica.com>
Subject: Re: Sorting File[] in Alphabetical Order
Date: 1999/06/25
Message-ID: <7l085p$fha17@forums.borland.com>
X-Deja-AN: 493808110
References: <7kqbl0$9h78@forums.borland.com> <7kqh48$a242@forums.borland.com> <3770FF2A.E30D62D7@inprise.com> <7kso7p$c276@forums.borland.com> <377260AB.3E786F93@inprise.com> <7kvddo$eei15@forums.borland.com> <3773A32E.649ED14@inprise.com>
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.jbuilder.java.language