Sorting algorithm in Total Commander is annoying

English support forum

Moderators: white, Hacker, petermad, Stefan2

ionut
Junior Member
Junior Member
Posts: 2
Joined: 2005-11-03, 16:54 UTC

Sorting algorithm in Total Commander is annoying

Post by *ionut »

Hi,
The way it sort the numbers in filename is annoying
ex:
1
10
2
21
3
4
5

So please sort them as numbers not as strings take as example Windows Explorer.

Ionut
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Not reading the help file or using the forum search before complaining is annoying too.

Set

Code: Select all

SortUpper=2 or SortUpper=3
in wincmd.ini [Configuration] section.

Icfu
This account is for sale
ionut
Junior Member
Junior Member
Posts: 2
Joined: 2005-11-03, 16:54 UTC

Ok I solve it

Post by *ionut »

Thanks,
I used Configuration menu->Options->Display->Sorting Directories
->Like Files
I couldn't find wincmd.ini in totalcmd directory.
Oh I see is in Windows directory.

I like Total Commander; is the best 8)
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

It's up to you where wincmd.ini is placed.

You can adjust it during TC installation, you can relocate it using INIReloc or by manual editing the registry key HKEY_CURRENT_USER\Software\Ghisler\Total Commander.

You can also just put it in TC directory and enter

Code: Select all

UseIniInProgramDir=7
in wincmd.ini.

If you are a real geek you can even start TC by parameter and create lots of different configs:

Code: Select all

totalcmd.exe /i=X:\path\to\wincmd.ini
As you can see, there are lots of possibilities. ;)

If you wanna know where the wincmd.ini is located that the actual TC instance is using, just look under Help->About.

Icfu
This account is for sale
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Yeah except if you use those other "optional' sorting algorithms then TC will do extremely stupid things, like putting files starting w/ "~" or _ at the end :evil:

Personally I'd vote for this to have its own section in the options menu, and allow for choosing how you would like things to be sorted. A few checkboxes for things like "normal" "xp-numerical style"
and a field which you can put special characters in to specify which ones should precede others.
Thus you could put: ~_-
in the box-field, and it would make those 2 symbols supercede all others, and '~' would superceded '_'
Having '-' in that list would stop TC from ignoring it, unless thats some option I am missing. Currently if you have a file list like:
somefile.txt
-somefile2.txt
somefile3.txt
you would think they should sort w/ -somefile2.txt first.

Should also be possible to change the setting in question, w/o having to restart TC to take effect.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Use SortUpper=3...

Icfu
This account is for sale
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I have tried the 3 sorting algortihm's - I find in a few cases it works fine, but overall it missorts large filelists of images. And since TC has to be restarted to make the change take effect, I prefer to just leave it on standard sort, which misplaces less files and which can easily be renamed.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

I find in a few cases it works fine, but overall it missorts large filelists of images.
Either it works correctly or it doesn't. If it fails on large filelists on your box this is a bug and you should make a bug report.

I have never seen such misplacements here but as I am neither using those fancy sorting orders nor have gigantic file lists, this doesn't necessarily mean that there is no problem.

Icfu
This account is for sale
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Here is how TC sorts with the 2 advanced sorting mechanisms:
Image001.jpg
image01.jpg
Image002.jpg
image02.jpg
Image003.jpg
image03.jpg
Image004.jpg
image04.jpg
Image005.jpg
image05.jpg
image006.jpg
image06.jpg
Image007.jpg
image07.jpg
image008.jpg
image08.jpg
Image009.jpg
image09.jpg
image010.jpg
And how it sorts normally:
Image001.jpg
Image002.jpg
Image003.jpg
Image004.jpg
Image005.jpg
image006.jpg
Image007.jpg
image008.jpg
Image009.jpg
image01.jpg
image010.jpg
Now which is LESS f'd up? I'd say the latter.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

What is wrong in example 1? Looks like perfect natural sorting to me.

Icfu
This account is for sale
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

It's hardly natural, when you start to have large lists of text and/or image files with numbers in their filename they are completely disorganized.

A natural sort would look more like:
file0007.txt
file0008.txt
file0009.txt
file0010.txt
...
file007.txt
file008.txt
file009.txt
file010.txt
...
file7.txt
file8.txt
file9.txt
file10.txt

A proper sort algorithm would need to take into account all the files in question and organize leading zero groups as such. But its easy to confuse a sort algorithm compared to what the eye can easily group together. And easier to just rename files with leading zero's to sort normally and use normal sort routine. But would still be nice to be able to specify which order to sort symbols in.
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

SortUpper=4, why not.

Icfu
This account is for sale
User avatar
Hacker
Moderator
Moderator
Posts: 13068
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

A natural sort would look more like:
file0007.txt
file0008.txt
file0009.txt
file0010.txt
...
file007.txt
file008.txt
file009.txt
file010.txt
...
file7.txt
file8.txt
file9.txt
file10.txt
Support++.

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.
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Comes from Win

Post by *Clo »

2Balderstrom

:) Hello !

- The stuff needed to get the advanced sorting is not a built-in TC code.
- It's provided by the library shlwapi.dll of Windows…

- Currently, AFAIK SortUpper=3 is the best one could obtain from that library (updated with Internet Explorer, so SortUpper=3 can work even under Win 98SE whether IE6 is installed…)

- It's not perfect, since spaces, dashes inside names etc. are not processed quite properly.

- Hence, the improvement might come from MS', where you could send such a request to … :D

:arrow: icfu

:) Hi Jeff !

- In fact, SortUpper=4 has been proposed by Paul Vansumsen a while ago, with a phone-book as template : All typographical marks and layouts (including spaces) are supported in the most logical order, like Balderstrom wishes 8)

:mrgreen: Kind regards,
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

2 Clo
Well I'm not gonna hold my breath for Microsoft to get something right :o
Post Reply