Remembering sorting mode with directory shortcuts
Moderators: Hacker, petermad, Stefan2, white
Remembering sorting mode with directory shortcuts
I think it would be useful if tc could remember a default sorting/display mode with saved directory shortcuts. Could be optional, too, like remembering the target directory is.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
This can pretty much be currently accomplished by:
1) saving settings.
2) copy wincmd.ini to: mySavedTabs.ini
3) create a TC shortcut
TARGET: "C:\Program Files\TotalCMD\TOTALCMD.EXE" /i=mySavedTabs.ini
Though I agree, a better option instead of having to load a different wincmd.ini, would be the ability to use a line command option to load a savedTabsFile. So your instance of TC can still use your normal wincmd.ini
I.E. Shortcut
TARGET: "C:\Program Files\TotalCMD\TOTALCMD.EXE" /S=T:"C:\Path\to\saved.tabs"
1) saving settings.
2) copy wincmd.ini to: mySavedTabs.ini
3) create a TC shortcut
TARGET: "C:\Program Files\TotalCMD\TOTALCMD.EXE" /i=mySavedTabs.ini
Though I agree, a better option instead of having to load a different wincmd.ini, would be the ability to use a line command option to load a savedTabsFile. So your instance of TC can still use your normal wincmd.ini
I.E. Shortcut
TARGET: "C:\Program Files\TotalCMD\TOTALCMD.EXE" /S=T:"C:\Path\to\saved.tabs"
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
Yeah it would, we'd need a:
cm_SaveSingleTab (toFile) :: save the current active tab only.
currently, we have:
Save Tabs (to file) and
Save Tabs on both sides (to file)
So a command to save a singleTab, and a CommandLine Flag to specify loading a tab file.
This would accomplish your request I believe. Since a directory shortcut itself, would have no where to store the sortmethod/or whether a custom column was active - but a saved tab file would.
cm_SaveSingleTab (toFile) :: save the current active tab only.
currently, we have:
Save Tabs (to file) and
Save Tabs on both sides (to file)
So a command to save a singleTab, and a CommandLine Flag to specify loading a tab file.
This would accomplish your request I believe. Since a directory shortcut itself, would have no where to store the sortmethod/or whether a custom column was active - but a saved tab file would.
Another way would be:
- Open and sort the folder(s) you'd like to save.
- Save the tabs via rightclick "save tabs to file" to eg "c:\mytabs01.tab"
- Create a new "Directory hotlist" entry with command "APPENDTABS c:\mytabs01.tab"
You'd still have to switch to the last opened tab but I think that's as close as you can get to your suggestion (without macros).
- Open and sort the folder(s) you'd like to save.
- Save the tabs via rightclick "save tabs to file" to eg "c:\mytabs01.tab"
- Create a new "Directory hotlist" entry with command "APPENDTABS c:\mytabs01.tab"
You'd still have to switch to the last opened tab but I think that's as close as you can get to your suggestion (without macros).
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
A Folder shortcut is a windows convention, that you can [optionally] tell to open with TC.
Or you make a totalcmd.exe shortcut, and use the command line flags [/S] [/O] [/L=PATH1] [/R=PATH2]
Neither of those conventions has any way to store/or indicate a TABSTOP sort method or an active Custom Column.
Or you make a totalcmd.exe shortcut, and use the command line flags [/S] [/O] [/L=PATH1] [/R=PATH2]
Neither of those conventions has any way to store/or indicate a TABSTOP sort method or an active Custom Column.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Ah! I wasn't aware that this wasn't a tc internal functionality, but an interface.
I noticed that it's possible to make a shortcut to cm_SrcByDateTime and sort the files in the active window by date (although apparently the directories aren't sorted?)
Is there a way to concatenate commands in the shortcut? I tried "cd c:\ | cm_SrcByDateTime" and it didn't work, and neither did "cd c:\; cm_SrcByDateTime"
Still even if I could get it to work that way, it wouldn't sort directories
I noticed that it's possible to make a shortcut to cm_SrcByDateTime and sort the files in the active window by date (although apparently the directories aren't sorted?)
Is there a way to concatenate commands in the shortcut? I tried "cd c:\ | cm_SrcByDateTime" and it didn't work, and neither did "cd c:\; cm_SrcByDateTime"
Still even if I could get it to work that way, it wouldn't sort directories

You can change that in Configuration -> Display -> Sorting directories: -> Like files (also by time)although apparently the directories aren't sorted
If you also want to be able to sort directories by extension (type), then add SortDirExt=1 to the [Configuration] section of you wincmd.ini file.
No.is there a way to concatenate commands in the shortcut? I
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
Yes, with TCMC. Put TCMC.exe in your TC folder and create a new user command: (eg em_cd_by_date)wayfinder wrote:Is there a way to concatenate commands?
Command: "%commander_path%\TCMC.exe"
Parameter: "CDS "c:" "" CMcm_SrcByDateTime"
This will change the source panel to c:\, leave the destpanel alone and sort by date.
Study the TCMC readme for the various options.
You can then use your custom command either as button or in the directory hotlist.
No, that option is already on. cm_SrcByDateTime still doesn't sort directories, try it for yourself. BUT! cm_SrcSortByCol does the trick. I'm going to try TCMC, which sounds like it could indeed be the key to providing the functionality I'm looking for.petermad wrote:You can change that in Configuration -> Display -> Sorting directories: -> Like files (also by time)although apparently the directories aren't sorted
Edit: it is! splendid.
tcmc CMcm_SrcSortByCol6 cds c:\ ""
This will do exactly what I want.
Thank you!
- Samuel
- Power Member
- Posts: 1930
- Joined: 2003-08-29, 15:44 UTC
- Location: Germany, Brandenburg an der Havel
- Contact:
You could also use ButtonBar eXtended.wayfinder wrote:Is there a way to concatenate commands in the shortcut?
- Balderstrom
- Power Member
- Posts: 2148
- Joined: 2005-10-11, 10:10 UTC
@Zoster,
Interesting, Thanks - I noticed TCMC before but kinda skipped over it, not realizing it allowed passing cm_'s directly to buttonBar "commands".
Note: TCMC.exe will also work as commands within a TC SubBar (ButtonBar), and/or a SubBar that is used as a menu -> [x] Show as a menu option, or MGPSoft's TCMenu.
Also Interesting, TCMC.exe is 2KB hehe.
Though, from that mentioned thread - looks like he packs it. It's not packed w/ UPX so not sure which one.
Interesting, Thanks - I noticed TCMC before but kinda skipped over it, not realizing it allowed passing cm_'s directly to buttonBar "commands".
Note: TCMC.exe will also work as commands within a TC SubBar (ButtonBar), and/or a SubBar that is used as a menu -> [x] Show as a menu option, or MGPSoft's TCMenu.
Also Interesting, TCMC.exe is 2KB hehe.
Though, from that mentioned thread - looks like he packs it. It's not packed w/ UPX so not sure which one.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Well, I did - and it works (as it has for the last 15 years!)No, that option is already on. cm_SrcByDateTime still doesn't sort directories, try it for yourself.

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