Enable numeric sorting for files/directories

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
MSuska
Junior Member
Junior Member
Posts: 3
Joined: 2022-12-13, 09:16 UTC

Enable numeric sorting for files/directories

Post by *MSuska »

Hi,

if you are not familiar with this, there is so called "numeric sorting" enabled in Windows.

More about the topic e.g. here:
https://www meridiandiscovery.com/how-to/why-windows-sorts-numeric-file-names-differently/

For a backward compatibility reasons this can be configurable in settings (if possible) so I can turn it on.

By default we sort strings in lexicographical order, that why 10 is before 2, Microsoft implemented that numeric sorting and I kind of like it, Explorer is using it, WinSCP is using it.

Thanks for considering this.

BR,
Martin
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: Enable numeric sorting for files/directories

Post by *mmm »

Yes, I could use this feature a lot.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6975
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Enable numeric sorting for files/directories

Post by *Horst.Epp »

Configuration / Display / Sort method:
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Enable numeric sorting for files/directories

Post by *Hacker »

Moderator message from: Hacker

Moved to the English forum.
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Enable numeric sorting for files/directories

Post by *Hacker »

MSuska, mmm,
It was implemented almost 20 years ago ;)
16.09.03 Release Total Commander 6.0 beta 1
20.05.03 Added: wincmd.ini, [Configuration] SortUpper=2 uses mixed lexical and numerical sorting, e.g. file10.txt comes AFTER file1.txt
Now accessible as a GUI option, like Horst.Epp wrote.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: Enable numeric sorting for files/directories

Post by *mmm »

Beautiful!
I wouldn't mind if the ancient options made it to the Name column context menu by default someday.
MSuska
Junior Member
Junior Member
Posts: 3
Joined: 2022-12-13, 09:16 UTC

Re: Enable numeric sorting for files/directories

Post by *MSuska »

Horst.Epp wrote: 2022-12-13, 10:36 UTC Configuration / Display / Sort method:
Thanks!

Is there a documentation to find out what different options mean?

Image: https://imgur.com/xhS4C60
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Enable numeric sorting for files/directories

Post by *petermad »

2MSuska
Is there a documentation to find out what different options mean?
Well, there is the Help (F1):
Help wrote:Sort method: Determines how the file lists are sorted in Total Commander:
Alphabetical, considering accents
Files are sorted by alphabet, using the compare function provided by the operating system for the current language. This takes language-specific accents into account.
Strictly by numeric character code
Files are sorted by the numeric uppercase character code. Since accents come behind the normal alphabet, accented letters will be sorted at the end.
Natural sorting: by character code and numbers
This sorting method sorts by numeric lowercase character code, plus by numbers if any are found. For example, file5.txt is sorted before file10.txt, although 1 comes before 5 - because 10 is larger than 5.
Natural sorting: alphabetical and numbers
Like the above, but also considers accents and other national sorting options. Needs Internet Explorer >=6.x installed on your system, because a function from IE6 is used for sorting
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
MSuska
Junior Member
Junior Member
Posts: 3
Joined: 2022-12-13, 09:16 UTC

Re: Enable numeric sorting for files/directories

Post by *MSuska »

Thanks! I'm using Total Commander for years and there is still something to learn...

PS: if someone could (and makes sense to you) can you mark the thread as "[solved]"?
User avatar
white
Power Member
Power Member
Posts: 5815
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Enable numeric sorting for files/directories

Post by *white »

MSuska wrote: 2022-12-27, 16:34 UTC PS: if someone could (and makes sense to you) can you mark the thread as "[solved]"?
You can do that yourself by editing the first post of this thread and changing the subject of that post.
Post Reply