Sort by date tab is not remembered

English support forum

Moderators: white, Hacker, petermad, Stefan2

Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Sort by date tab is not remembered

Post by *Umpal »

I have couple of tabs that are set to [face=courier]sort by date[/face]. If I close TC staying on one of them and restar TC that active tab is [face=courier]sort by name[/face] (the rest stay correctly sorted by date). Is there an option to make TC remember? Not a big deal but a little bit annoying.
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

View Mode | Auto Switch Mode | Sort by date | tabs

Post by *tuska »

You can force that by creating of the following:

1-- 'View Mode'
1.1 Configuration - Options - View Mode - Add: Sort by date (ascending or descending) -> Name of your View Mode (see also: 2.5)
1.2 Columns view: Unchanged
1.3 Sort order: Date (Example: If "Descending" is NOT ticked, then sort order ascending is applied)
1.4 Auto-run commands: |cm_SrcViewMode0 -> that means, that <Default> view mode is applied when you leave this view mode (sort) ...
1.4 IMPORTANT: You should check if you have defined a <Default> View Mode - if not, then make sure to enter something there(!),
1.4 E.g. Columns view: Full, Sort order: Name
1.5 Button "Help" for infos, Button "OK" -> finished with View Mode

2-- 'Auto Switch Mode'
2.1 Configuration - Options - Auto Switch Mode: -> "Automatically switch view mode on directory change:" must be ticked!
2.2 Button "Add..."
2.3 Rule: +: Must match -> Directory: For example D:\Data\* (path of your tab) ...
2.3 Explanation: D:\Data\ = Just the folder "Data", D:\Data\* = The folder "Data" and all subfolders (<-- from HELP F1)
2.4 Click on "More sub-rules", then click on "&" (left under "Rule") and change it to: | OR (any match),
2.4 Rule: +: Must match -> Directory: ... Example: D:\pictures\* ... and so on ...
2.5 Finally -> Set this mode: Click on the dropdown-arrow and choose your View Mode: Sort by date (ascending)
2.6 Button "Help" for infos, Button "OK" -> finished with Auto Switch Mode

Whenever you enter the defined folders [by clicking on the tab] View Mode will be applied on the basis of the Auto Switch Mode.

Regards
Karl
Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Re: View Mode | Auto Switch Mode | Sort by date | tabs

Post by *Umpal »

Thank you for your quick answer Tuska. I tried the 'View Mode' but it changed all my tabs to '[face=courier]sort by date[/face]'. Of course I didn't want that. As I mentioned all tabs are remembered with their 'sort by' correctly but only active one loses its setting when I close TC and reopen it. 'Auto Switch Mode' recommended by you as a second could solve partially my 'problem' but it'd be much better if TC just remembered this setting for active tab(s) as well...

Edit: I see now that these are not two different methods but one in two steps. I created those rules but it still sorts all my tabs by date, not just the one I set for rule (which is drive Q: by the way).

Edit.2: My bad, I changed [face=courier]<default>[/face] to '[face=courier]sort by date[/face]' and forgot to change it back. Now it works as intended. Thank you Tuska! I still hope for a natural 'fix' to this situation.
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: View Mode | Auto Switch Mode | Sort by date | tabs

Post by *Gral »

Umpal wrote:...I still hope for a natural 'fix' to this situation.
Already exist!

1. Set first tab to "sort by date".
2. Configuration - Options - Operation - Save on exit - clear "Panels"
3. Now chosse Configuration - Save settings
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

2Gral
Does it work for you after using
- "tabs" and
- "tabs, locked, but directory changes allowed"
after a restart of TC?

------
Edit:
I did some tests with a clean.ini (without tabs, with "tabs" and "tabs, locked, but directory changes allowed" and restart of TC).
All tests were succesfull with "Save on exit" - "Panels (brief/full, etc.)" ticked!
A 'View Mode' and 'Auto Switch Mode' should not be required.

Despite of Savepanels=1 in wincmd.ini under [Configuration] any other setting must influence this parameter on my PC.
(I only use "tabs, locked, but directory changes allowed", BTW)
That lead me to believe that the above is required.

Regards
Karl
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Post by *Gral »

tuska wrote:...
All tests were succesfull with "Save on exit" - "Panels (brief/full, etc.)" ticked!..
Did you change to other sortorder before exit?
If you change sortorder of active tab before exit, this state is remembered with "Panels" ticked! (Savepanels=1)

Procedure described earlier is for remember sortorder "forever".
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Gral wrote:Did you change to other sortorder before exit?
If you change sortorder of active tab before exit, this state is remembered with "Panels" ticked! (Savepanels=1)
Test: OK -> Yes, I changed the sortorder - even from 4 tabs (2 ascending, 2 descending) - before exit TC using a clean.ini.

Test: NOK -> with mine wincmd.ini. (wincmd.ini is writeable!)
1-- I have two rows of tabs in left panel. Tab D:zzz is active (in the second line) and not locked in the left panel;
1-- there is also 13 "tabs, locked, but directory changes allowed" in the left panel.
2-- Configuration - Operation - Save on exit: Panels (brief/full, etc.) ticked (Savepanels=1)
3-- sortorder of active tab D:zzz is changed to date/descending
4-- Configuration - Save settings
5-- Files - Quit (ALT+F4)
6-- Restart of TC
7-- Tab D:zzz is active (in the second line) and not locked in the left panel
8-- NO SORTING anymore!
Gral wrote:Procedure described earlier is for remember sortorder "forever".
Very interesting, you have to come to that first(!) ... Save on exit - clear "Panels"(!)
Test: OK, using a clean.ini

Test: NOK -> with mine wincmd.ini (using the same steps as with clean.ini).

I do not know why that's the case with me but I will leave it for the time being.
If I should need that one day, then at least I know another solution.

Thanks in any case for your explanations!
Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Re: View Mode | Auto Switch Mode | Sort by date | tabs

Post by *Umpal »

Gral wrote:1. Set first tab to "sort by date".
2. Configuration - Options - Operation - Save on exit - clear "Panels"
3. Now chosse Configuration - Save settings
WOW, that really works for me but... I had the opposite, my '[face=courier]Panels[/face]' option was unchecked! Silly me :oops:. On contrary to Tuska, my [face=courier]Totalcmd.ini[/face] (which is at least 17-years-old and has a lot of stuff I put across the time) works with this setting as expected. Thank you Gral :D

PS I still keep that profile [face=courier]Sort by date[/face] described by Tuska for some directories as I find it very useful as well.
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

After I was not successful with TC 9.12 (x64), I started TC 8.52a 64bit (no clean.ini)
and was very surprised that the sorting was suddenly available!

Tests with TC 8.52a 64bit showed that with both of the above variants (Savepanels=0 and Savepanels=1)
the set sorting is retained as desired.*)
*) EDIT: After a restart, however, the last active tab (another one) also received this sorting!

Which TC variant did you use? ;-)
Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Post by *Umpal »

tuska wrote:Which TC variant did you use? ;-)
I'm on 9.12 x86.
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

Umpal wrote:
tuska wrote:Which TC variant did you use? ;-)
I'm on 9.12 x86.
With Total Commander Version 9.12 32 bit (2017-11-24) it does not work with my wincmd.ini either (both variants).
Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Post by *Umpal »

This is my [face=courier][Configuration][/face] section:

Code: Select all

1HourDif=1
ActiveRight=1
Aligned Extension=0
AltSearch=3
AlwaysToRoot=0
AutoTreeChange=0
CmtOemFont=0
CompareCaseSensitive=0
CompareIgnoreRepeatedLines=0
CompareIgnoreRepSpace=1
CompareVertical=0
CopyComments=14
CountMarked=1
CountSpace=1
CustomFieldsInDlg=1
DirBrackets=1
DirTabLimit=32
DirTabOptions=2042
Editor=%COMMANDER_PATH%\plugins\F4Menu\F4Menu.exe "%1"
ExplorerForCopy=0
FileTipWindows=1
FirstMnu=1349
FirstTime=0
FirstTimeUnpack=0
FirstTimeZIP=0
IconOverlays=1
IconsInMenus=17
IconsOnNet=0
IconsSpecialFolders=3
IgnoreListFile=%COMMANDER_PATH%\tcignore.txt
IgnoreListFileEnabled=0
InactiveFocus=1
LastMD5=0
LastRunAs=Administrador
ListName=%COMMANDER_PATH%\ftplist.txt
LogKeepCount=30
LogOptions=7198
LogRotateLimit=0
MarkDirectories=1
OldStyleTree=0
OnlyOnce=0
PanelsVertical=0
PluginBaseDir=%COMMANDER_PATH%\PLUGINS
QuickSearchAutoFilter=0
QuickSearchExactMatch=0
QuickSearchMatchBeginning=0
RenameSelOnlyName=1
SaveCommands=1
SaveHistory=1
SavePanels=1
SavePath=1
SeparateTree=0
ShowCentury=1
ShowEXEandLNKicons=2
ShowHiddenSystem=1
ShowIcons=2
ShowParentDirInRoot=1
SingleClickStart=0
SizeFooter=3
SizeStyle=0
Small83Names=0
SortDirsByName=1
SortUpper=0
SoundDelay=-10
SpeedLimit=4000
StartupScreen=0
SyncButtons=61
SyncFlags=13
TabDir=%COMMANDER_PATH%\tabs\
Test=27
ThumbExplTypes=*.* | *.htm *.html
ThumbHeightNoCache=96
ThumbIrfXnTypes=*.*
ThumbOptions=15
ThumbPlgTypes=*.*
ThumbsCopyDel=1
ThumbsCustomField=[=images.Width]x[=images.Height]
ThumbsCustomFieldsEnabled=1
ThumbsLocation=
ThumbTxtTypes=*.txt *.ini
ThumbWidthNoCache=96
Tips=3
TrayIcon=1
UnicodeListWarn=0
UseLongNames=1
UseRightButton=1
UseTrash=1
Viewer=%COMMANDER_PATH%\AddSoft\IrfanView\i_view32.exe
ViewerType=0
Win32TipWindows=0
Win95Delete=0
CheckUsbHdd=0
CrcSeparateFiles=1
LastSearchOptions=36
UseNewDefFont=0
AutoReUpload=2
IconClickSelection=1
CopyDirTimeStamp=1
CrcAppendExt=0
SetEncoding=äö.do.not.remove
MinIconWidth=-2
MinLineHeight=0
OldListIcons=1
ShowHiddenSystemOverlay=1
ShowHiddenDimmed=1
OldDriveIcons=0
CommentPreferredFormat=4
WatchDirs=3
CrcSeparateFolders=0
FirstTimeIconLib=0
WarnMissingExtensions=0
CompareBytesPerLine=8
EverythingForSize=0
Down to [face=courier]Win95Delete=0[/face] line is a very old part that I sorted by name years ago. After that (unsorted) is what newer TC versions added. I hope it helps you somehow.

Edit: Perhaps it's not what I have there but rather what I do not? Compare to yours and let us know.
User avatar
tuska
Power Member
Power Member
Posts: 3740
Joined: 2007-05-21, 12:17 UTC

Post by *tuska »

2Umpal
Thanks for sharing of your [Configuration] section.

After a short comparison I have to say that unfortunately there are a lot of differences between yours and mine.
I find the review too time-consuming and too complicated and where a possible crucial entry in the wincmd.ini is,
probably only the author knows. If necessary, I can also send the complete wincmd.ini to the author.

For this reason, I will only give a personal summary below.

Subsequent tests were performed (two variants):
1. Panels (brief/full, etc.) ticked | D:\zzz set first tab to "sort by date" descending | Configuration - Save Settings | ALT+F4 | Restart TC
2. Panels (brief/full, etc.) ticked | D:\zzz set first tab to "sort by date" descending | ...
2. Configuration - Options - Operation - Save on exit - clear "Panels" - Apply - OK | Configuration - Save Settings | ALT+F4 | Restart TC

Results (only on my PC!):
1. Clean.ini | TC 9.12 (x86, x64) -> OK
2. wincmd.ini | TC 8.52a (x86, x64) -> OK
3. wincmd.ini | TC 9.0 and TC 9.12 (x86, x64) -> NOK (not OK)
Umpal
Junior Member
Junior Member
Posts: 36
Joined: 2010-12-23, 13:33 UTC

Post by *Umpal »

That's really strange. I bet there is something in your ini file that shouldn't be there anymore. If you wish you can post it here or send it to me directly - I'll look into it.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2tuska

Could you perhaps have redirected one or more of these sections in your wincmd.ini for TC 9.x: [left], [right], [lefttabs] of [righttabs] to a file that is no longer writeable?

Have you tried using your wincmd.ini from your TC 8.52a TC with yor TC 9.x ?
Last edited by petermad on 2018-01-21, 02:58 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply