ExamineDirectory and alphabetical sorting

Everything else that doesn't fall into one of the other PB categories.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

ExamineDirectory and alphabetical sorting

Post by Tranquil »

Hi all!

I encountered that ExamineDirectory lists Folders and Files in alphabetical order. (tested on windows).

Is this trustable? Or should I do an own sorting to be sure?

Thanks for any hint.
Tranquil
Konne
Enthusiast
Enthusiast
Posts: 434
Joined: Thu May 12, 2005 9:15 pm

Post by Konne »

It's not at all trustable. Do it yourself!
Apart from that Mrs Lincoln, how was the show?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Why not saving all names to a linked list and sort t with the sorting commands?
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: ExamineDirectory and alphabetical sorting

Post by Rescator »

Tranquil wrote:Hi all!

I encountered that ExamineDirectory lists Folders and Files in alphabetical order. (tested on windows).

Is this trustable? Or should I do an own sorting to be sure?

Thanks for any hint.
Nope! As far as I know this is subject to OS/filesystem default.
Which could be anything, alphabetical, creation date, physical order.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

AND51 wrote:Why not saving all names to a linked list and sort t with the sorting commands?
I still save the directory in a linkeslist. But I wanted to save some CPU Time for sorting it as I noticed that the results are already sorted by the OS. And so I wondered about it...

But to be sure I will do a sort myself. Thanks for all your hints!
Tranquil
Post Reply