Numerical sorting of filenames with multiple decimal numbers

I love the ability to have files sorted numerically but for some reason I recieve a sorting that I did not expect. I have many long filenames with different numbers in them like which are sorted likeso:

Name1_Number_0.01_OtherNumber_0.001.png
Name1_Number_0.01_OtherNumber_2E-005.png
Name1_Number_0.1_OtherNumber_0.001.png
Name1_Number_0.1_OtherNumber_2E-005.png
Name1_Number_0.02_OtherNumber_0.001.png
Name1_Number_0.02_OtherNumber_2E-005.png
Name2_Number_0.01_OtherNumber_0.001.png
Name10_Number_0.01_OtherNumber_0.001.png

Here a screenshot:

I expected to have them sorted like so:
Name1_Number_0.01_OtherNumber_0.001.png
Name1_Number_0.01_OtherNumber_2E-005.png
Name1_Number_0.02_OtherNumber_0.001.png
Name1_Number_0.02_OtherNumber_2E-005.png
Name1_Number_0.1_OtherNumber_0.001.png
Name1_Number_0.1_OtherNumber_2E-005.png
Name2_Number_0.03_OtherNumber_0.001.png
Name10_Number_0.01_OtherNumber_0.001.png

That is, 1) sort first number 2) if first number is equal sort second 3) etc.

I do understand that Dopus 12 cannot make sense of the 2E-005 being meant as a smaller number than 0.001 but I would have expected to have the Name_1_Number_0.1 files after the Name_1_Number_0.02 regardless.

I tried switching the "numeric sorting" option on and off in the Folder Options dialog and that seemed to fix the issue with the second number but now the sorting for the first number is 1,10,2,...

I am a little puzzled about what is going on, does Dopus check in my region settings and maybe expects a comma as a decimal operator and thus cannot understand decimal numbers? I set my decimal separator to a period but that did not seem to change anything.

Is there a way to make Dopus sort like I described above or is this even the intended behavior?

Many thanks in advance, please excude all the file name clutter and thank you for such an awesome Explorer replacement!

Cheers,
Jonas

With multiple numbers, it might be getting confused trying to figure out what it should sort on.

You would have better success creating a custom column, pulling out the number you care about and sorting by that. There is a script for this RegexColumnsReloaded (easily add regex columns or any kind of column).

I had a problem, I decided to solve it with regexp, now I have two problems ;).

That is a very good possibility. And as is hinted on by the devs in another thread it is actually the OS's sorting algorithm they are using so who knows what Microsoft cooked up there.

Thank you for your suggestion, I will look into it that looks really worthwile! And thank you for a quick laugh as I also enjoy working with regexps.....very much :slight_smile:

1 Like

Here's another idea instead of going the column route: in a script button, you can probably set manual_sort_mode then use SetOrder to pass the file names in the order you want. I haven't tried this myself and there are probably other ways.

I happen to have a script tidbit I made some time ago when I was trying to learn a bit of scripting and playing with the idea of doing a custom sort prior to renaming. The button for demonstration purposes only: it outputs text that shows the files sorted by name length + name

Attaching the button just in case it helps you get started.

Custom Sort Tidbit.dcf (3.8 KB)

Sorry for the late reply! I have not yet fiddled with the scripting of Directory Opus but that is something I am certainly looking forward to.

Thank you for the button, I am still unfamiliar with the scripting engine but that might help me to hack something together that does what I want.