Make ASCII/Numerical sort a user selectable option.

Have a suggestion for "Everything"? Please post it here.
Post Reply
adostrom
Posts: 5
Joined: Fri Jul 14, 2017 8:09 pm

Make ASCII/Numerical sort a user selectable option.

Post by adostrom »

There was a brief discussion of this in the "General" forum that degenerated fast... viewtopic.php?f=2&t=6547&hilit=sort

What I need is the ability to sort files in the same way that Windows Explorer does, and in a way that is easier for me to find the files I'm looking for. Currently, Everything would sort a group of files like this:

File 1
File 11
File 2
File 20
File 3
File 4
...

This is fine if you're working with small numbers of similar files, and I can deal with it sometimes by padding out the filenames with zeros - then you get a "numeric sort":

File 01
File 02
File 03
File 04
File 11
File 20
...

But, sometimes I have to deal with large numbers of files, especially photos (I'm a long-time photographer) - right now there are over 1 million .jpgs and .raw files on my system, and many of them don't have leading zeros in the filenames due to the way that multiple cameras, scanners, and editing software has treated the files. "DSC 0055.jpg", "DSC 055-corrected.jpg" and "DSC 55.raw" MIGHT all be the same image, or might not - a numerical sort would be REALLY helpful.

So, I'm looking for this behavior:

File 1
File 02
File 003
File 00004
File 11
File 20

Thanks for listening!
Janus
Posts: 84
Joined: Mon Nov 07, 2016 7:33 pm

Re: Make ASCII/Numerical sort a user selectable option.

Post by Janus »

I use explorer++, a windows explorer replacement for the prebroken one they ship with now.
It uses the sorting you are asking about.

I also just got done recompiling it after turning that behavior off.
Once I figure out how to add it in that context, I will add the option to toggle.

In the context of everything, it should be easily done.

The difference is between two different sorting routines for strings.

StrCmpl & StrCmpLogicalW.

The former does a simple case insensitive sort based on ascii order.
The latter sorts taking numbers into account.

If void decides to include this.
It is a simple sort toggle setting, and perhaps a search command to tweak on the fly.

While it is a little bit of work.
It preserves legacy function, without impinging on new functionality.

I am not a real C/C++ programmer, so I may be misestimating the difficulty.


Janus.
void
Developer
Posts: 16683
Joined: Fri Oct 16, 2009 11:31 pm

Re: Make ASCII/Numerical sort a user selectable option.

Post by void »

Numerical / Natural sort is on my TODO list.

http://www.voidtools.com/forum/viewtopic.php?f=2&t=6547

Thanks for the suggestion.
Post Reply