[Sugg] Sorting only according to shown values
Moderators: Hacker, petermad, Stefan2, white
[Sugg] Sorting only according to shown values
Would it be possible to add an internal toggle command to let TC sort only according to the shown values? This would be very useful for multiple column sorting.
For instance when sorting by date, TC considers also seconds even though they are not shown. Or when sorting by tc.size.Gbytes TC considers smaller size differences, too, even though the value for all files is "0".
Now if you try to use multiple column sorting, it has little effect, if the sizes aren't absolutely equal (regardless of the "0" shown in the column). With the proposed command the sort would only use the shown values, as might be expected.
Original idea from Neue Features?
TIA
Roman
For instance when sorting by date, TC considers also seconds even though they are not shown. Or when sorting by tc.size.Gbytes TC considers smaller size differences, too, even though the value for all files is "0".
Now if you try to use multiple column sorting, it has little effect, if the sizes aren't absolutely equal (regardless of the "0" shown in the column). With the proposed command the sort would only use the shown values, as might be expected.
Original idea from Neue Features?
TIA
Roman
Last edited by Hacker on 2006-11-09, 23:30 UTC, edited 1 time in total.
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.
- StickyNomad
- Power Member
- Posts: 1933
- Joined: 2004-01-10, 00:15 UTC
- Location: Germany
Seconds suck
2Hacker
Hello Roman !
• I support, of course!
• Sorry, I've missed that thread before…
KR
Claude
Clo

• I support, of course!
• Sorry, I've missed that thread before…

Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
Me too - support ++Sorry, I've missed that thread before
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
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
Re: [Sugg] Sorting only according to shown values
Well, perhaps, 15 years later, there is a chance? 
Roman

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.
Re: [Sugg] Sorting only according to shown values
It looks like the time has come to lift this wonderful suggestion out of the dust again.
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: [Sugg] Sorting only according to shown values
Unfortunately I tried and failed. For example, how would you sort a partially shown date or time? or a partially shown size? Just sorting stupidly by the characters does NOT work correctly. And don't even start thinking about multiple fields together...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: [Sugg] Sorting only according to shown values
Christian,
Can you please elaborate?
2.2022 -> date (1.2.2022)
0 -> number
0,18 -> number
1983 -> date (numbers between 1900 and 2200 could be treated as dates, or worst case, numbers)
5211 -> number
1.6.202suddenlyletter -> string
8 32 15 -> string
XV.VI.MMXXII -> date (kidding, string)
zero point eight -> string
AFAIK valid delimiters for the current locale can be provided by Windows.
This seems like a good start. What am I missing?
Roman
Can you please elaborate?
- Valid dates or times should be treated and sorted as such. Examples of valid dates: "2022", "06.2022", "07.06.2022", "7.6.2022". Examples of valid times: "1:21", "14:28", "1 am", "02:18 pm".
- Valid numbers should be treated and sorted as such. Examples of valid numbers: "11", "5280146251374968", "18,4385".
- Everything else should be treated and sorted as a string.
2.2022 -> date (1.2.2022)
0 -> number
0,18 -> number
1983 -> date (numbers between 1900 and 2200 could be treated as dates, or worst case, numbers)
5211 -> number
1.6.202suddenlyletter -> string
8 32 15 -> string
XV.VI.MMXXII -> date (kidding, string)
zero point eight -> string
AFAIK valid delimiters for the current locale can be provided by Windows.
This seems like a good start. What am I missing?
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.
Re: [Sugg] Sorting only according to shown values
I think you want to make it too complicated !ghisler(Author) wrote: 2022-06-07, 08:42 UTC Unfortunately I tried and failed. For example, how would you sort a partially shown date or time? or a partially shown size? Just sorting stupidly by the characters does NOT work correctly. And don't even start thinking about multiple fields together...
Let the user chose:
You could add a special marker [N][T] in Column definition or a sorting indication in the UI to fix it Default, As plain txt, Natural number...
When it is not defaulted, just use displayed text as reference.
It is very confusing to extract text in a column and sorting is not on the extracted text. Worse it is not possible to sort on what we want i.e Date.M or Time.h ... filename starting at char 8 ....
Re: [Sugg] Sorting only according to shown values
I would like to have sort built on top of what we see/extract and not from entire wdx_plugin.field / Strings that compose the column definition.
To make it simple i would use only what is extracted as base for comparison :
Tc.fullmane:8- -> String from fullname keep what is after pos 8
tc.writedate:1-4 -> String YYYY
tc.accessdate.M-D-Y : full datetime Field without time
tc.createddate.D.M.y : full datetime Field without time y is the same as Y meaning Year is significant
tc.createtime.h : time hour only
tc.writedate.D a Date where Y = 0, M=1, D is D and Time is 0
tc.modifieddate.h.m:s a DateTime where Date is null and Time with hms
...
As a first attempt i would just put calculated display string a sorted object.
We could probably ignore static string for comparison, about prefix and postfix this is still questionable.
We have in one software (Java) object in listview column that have a Display String and an ordered List with multiple object use for sorting, refresh URL, .... The compounded comparison is based on Comparing iteratively each object in the list using dedicated comparison method.
To make it simple i would use only what is extracted as base for comparison :
Tc.fullmane:8- -> String from fullname keep what is after pos 8
tc.writedate:1-4 -> String YYYY
tc.accessdate.M-D-Y : full datetime Field without time
tc.createddate.D.M.y : full datetime Field without time y is the same as Y meaning Year is significant
tc.createtime.h : time hour only
tc.writedate.D a Date where Y = 0, M=1, D is D and Time is 0
tc.modifieddate.h.m:s a DateTime where Date is null and Time with hms
...
As a first attempt i would just put calculated display string a sorted object.
We could probably ignore static string for comparison, about prefix and postfix this is still questionable.
We have in one software (Java) object in listview column that have a Display String and an ordered List with multiple object use for sorting, refresh URL, .... The compounded comparison is based on Comparing iteratively each object in the list using dedicated comparison method.