TC9: View Modes Sort Order - Sort Directories Like Files?

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Rob Weinstein
Junior Member
Junior Member
Posts: 45
Joined: 2006-06-10, 21:41 UTC
Location: Arizona

TC9: View Modes Sort Order - Sort Directories Like Files?

Post by *Rob Weinstein »

Using TC9 beta 3.

Is it possible to setup a View Mode to sort directories like files and override the default sort directories always by name?

I want to set up a View Mode in a certain folder where the files AND directories are sorted by date (descending). For example, this is what I want in a folder defined in Auto Switch Mode:

Code: Select all

c:\TC_test\Special_Folder\

   c_folder\    <DIR>   03/03/2016 03:33a
   b_folder\    <DIR>   02/02/2015 02:22a
   a_folder\    <DIR>   01/01/2014 01:11a
   c_file.txt       8   03/03/2016 03:33a
   b_file.txt       8   02/02/2015 02:22a
   a_file.txt       8   01/01/2014 01:11a
This is how I want every other folder to sort when I sort by date (descending):

Code: Select all

c:\TC_test\Normal_Folders\

a_folder\   <DIR>   01/01/2014 01:11a
b_folder\   <DIR>   02/02/2015 02:22a
c_folder\   <DIR>   03/03/2016 03:33a
c_file.txt      8   03/03/2016 03:33a
b_file.txt      8   02/02/2015 02:22a
a_file.txt      8   01/01/2014 01:13a
To summarize:
In the Auto Switch folder I want sort directories like files.
In every other folder I want sort directories always by name.

I tried to set it up but the View Mode won't override the Sorting Directories configuration. Here's an excerpt from my wincmd.ini:

Code: Select all

[Configuration]
...
SortDirsByName=1

[ViewModeSwitch]
Enabled=1
...
2_rules=+C:\TC_test\Special_Folder\*\
2_mode=2

[ViewModes]
...
2_name=Sort Folders
2_icon=
2_options=-1|3|1||-1|-1|-1
Thanks,

-Rob
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48107
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

There is a command cm_SwitchDirSort to turn this mode on and off, but there isn't a command cm_SwitchDirSortOn or cm_SwitchDirSortOff, so you don't know what will happen when you use this. I will consider adding two separate commands which could be used with view modes.
Author of Total Commander
https://www.ghisler.com
User avatar
nsp
Power Member
Power Member
Posts: 1813
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(Author) wrote:There is a command cm_SwitchDirSort to turn this mode on and off, but there isn't a command cm_SwitchDirSortOn or cm_SwitchDirSortOff, so you don't know what will happen when you use this. I will consider adding two separate commands which could be used with view modes.
Instead of adding new command numbers....
Could it be possible to just add a parameter like on/off or 0/1 to the current command and to most of the switch or hide/show command.
Without parameter you switch like it is today and with an explicit parameter you turn on/off show/hide....


basically it should target most of cm_visXXXX and cm_switchZZZ
User avatar
petermad
Power Member
Power Member
Posts: 14824
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Could it be possible to just add a parameter like on/off or 0/1 to the current command and to most of the switch or hide/show command.
Without parameter you switch like it is today and with an explicit parameter you turn on/off show/hide....


basically it should target most of cm_visXXXX and cm_switchZZZ
Sounds like a good idea if feasible
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48107
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

cm_SwitchDirSort is currently a global option, you can't set it separately per tab or directory.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14824
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Maybe it was an idea to add a new field to the View modes configuration, someting like:

"Auto-run commands exiting this mode:"

Then you could run toggeling commands like cm_SwitchDirSort once again to "reset" them.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply