Remembering sorting mode with directory shortcuts

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

wayfinder
Junior Member
Junior Member
Posts: 29
Joined: 2009-07-23, 10:08 UTC

Remembering sorting mode with directory shortcuts

Post by *wayfinder »

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.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1015
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

I'm pretty sure this was suggested already but

support++

Btw when you save and reopen tabs the sorting is also restored. You could then load the tab file from the Directory hotlist via the commands OpenTabs or AppendTabs.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

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"
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
wayfinder
Junior Member
Junior Member
Posts: 29
Joined: 2009-07-23, 10:08 UTC

Post by *wayfinder »

Wouldn't that restore ALL tabs to a certain snapshot state though? That sounds like a very different behaviour to what I was thinking of...
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

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.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1015
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

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).
wayfinder
Junior Member
Junior Member
Posts: 29
Joined: 2009-07-23, 10:08 UTC

Post by *wayfinder »

Balderstrom:

Why wouldn't a shortcut have anywhere to store the sorting method? It can store a target directory, after all :)
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

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.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
wayfinder
Junior Member
Junior Member
Posts: 29
Joined: 2009-07-23, 10:08 UTC

Post by *wayfinder »

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 :(
User avatar
petermad
Power Member
Power Member
Posts: 14899
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

although apparently the directories aren't sorted
You can change that in Configuration -> Display -> Sorting directories: -> Like files (also by time)

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.

is there a way to concatenate commands in the shortcut? I
No.
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
ZoSTeR
Power Member
Power Member
Posts: 1015
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

wayfinder wrote:Is there a way to concatenate commands?
Yes, with TCMC. Put TCMC.exe in your TC folder and create a new user command: (eg em_cd_by_date)

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.
wayfinder
Junior Member
Junior Member
Posts: 29
Joined: 2009-07-23, 10:08 UTC

Post by *wayfinder »

petermad wrote:
although apparently the directories aren't sorted
You can change that in Configuration -> Display -> Sorting directories: -> Like files (also by time)
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.

Edit: it is! splendid.

tcmc CMcm_SrcSortByCol6 cds c:\ ""

This will do exactly what I want.

Thank you!
User avatar
Samuel
Power Member
Power Member
Posts: 1930
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Post by *Samuel »

wayfinder wrote:Is there a way to concatenate commands in the shortcut?
You could also use ButtonBar eXtended.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

@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.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
petermad
Power Member
Power Member
Posts: 14899
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

No, that option is already on. cm_SrcByDateTime still doesn't sort directories, try it for yourself.
Well, I did - and it works (as it has for the last 15 years!) :P
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