Smart file sorting

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Smart file sorting

Post by Whitman »

Is "smart sorting" part of xplorer2?
By smart sorting I mean, say I have three files, file1text.txt, file2text.txt and file10text.txt.
In explorer, when sorted by name, these would be displayed as
file1.txt
file2.txt
file10.txt

In xplorer2 however they are displayed as
file1.txt
file10.txt
file2.text

Explorer smartly sorts them, as obviously 2 is less than 10.  If this isn't already in xplorer2 then it's a feature request.  :)
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

in the old days, when men were men and women wouldn't mind giving birth in emergency barns :xmas:, computer users would understand the strict necessity of lexicographic sort and thanked the heavens because they saw the goodness in it. It is fast and if you want to have files sorted numerically you prepend zeros to the smallest of them like file01.txt

now microsoft offers this kludge for the not-so-hardcore users. It slows things down and its effect would be evident in large folders. Is this progress?
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

Totally agree with Nikos. Keep it sorted lexicographically!! The lazy !@#$%^&*'s who are not willing to add that extra '0' (or more than one if necessary) in front of the numbers have to suffer  :twisted:

Tip: If you have to rename lots of files with numbers, the batch feature of comes to the rescue :) (menu Tools|Command script... or Ctrl+B after selecting the files to be renamed; see also the manual for more info about this)

8)
Dumb questions are the ones that are never asked :turn:
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

Somehow I already knew the answer before I read the reply.  Unfortunately, in the case where I would like this feature the most, I don't have control over the filenames and can't change them.  :(
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i just found this api StrCmpLogicalW that does this sorting but it is XP only
if enough people ask for it i'll add it as an option
Whitman
Member
Member
Posts: 44
Joined: 2003 Aug 23, 01:14

Post by Whitman »

Thanks.  Hopefully enough people ask.
BRX
Silver Member
Silver Member
Posts: 304
Joined: 2002 Feb 08, 12:12

Post by BRX »

Call me in. While I'll totally agree with sorting lexicographical and use it where I can it would be a major help for organising files which have been named by others.

It's a hassle to pick them from the "unsorted" list for renaming etc.
So my vote for an option is yes.

BRX
User avatar
JRz
Gold Member
Gold Member
Posts: 560
Joined: 2003 Jun 10, 23:19
Location: NL

Post by JRz »

nikos wrote:i just found this api StrCmpLogicalW that does this sorting but it is XP only
if enough people ask for it i'll add it as an option
You can't have too many options :D
Dumb questions are the ones that are never asked :turn:
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

i was just thinking that probably this sorting mode will be fighting against the locale-aware name sorting that just got fixed...

how does explorer (XP version) sort by name? Does it do the "granny" number mode?
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

yes, XP does the new 'granny' number sort.
I didn't realize it until Whitman asked the question (my first reaction was disbelief -- then I checked)

Even though files I name use prepended zeros for lex-sort (& also easy-to-read common width), the files I often have to work with from other sources are not so nicely named.

So I concur with the others that it IS a useful, timesaving, error-reducing feature for granny & for me.

PS - & request for a related feature:
How about a special mass rename option to zeropad numbers in selected filenames? -- Even if only useful for files the user CAN rename.  
{could also be a trial testbed for part of granny number sort development before stuffing that into the recently upgraded sort routine.} ;)
User avatar
nikos
Site Admin
Site Admin
Posts: 15806
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

there you go, we've reached critical mass already! :)
but gents, it will be registry only tweak for the time being
BRX
Silver Member
Silver Member
Posts: 304
Joined: 2002 Feb 08, 12:12

Post by BRX »

nikos wrote:there you go, we've reached critical mass already! :)
but gents, it will be registry only tweak for the time being
What did you expect asking if the usual suspects want more options?

But I hope the "for the time being" is only temporary because for me (and I suspect for Fred too) the value in the option is to *switch* between the sorts comfortably to "clean" it up.
Gandolf
Gold Member
Gold Member
Posts: 474
Joined: 2004 Jun 12, 10:47

Post by Gandolf »

"Granny" sorting option also for me since I often have the sorting problem where other people have numbered files, without a leading zero, and they cannot be easily changed.
Post Reply