[Feature Requesst] Add a command `cm_ReloadSettings`

Here you can propose new features, make suggestions etc.

Moderators: Hacker, Stefan2, white

Post Reply
Troy_Daniel
Junior Member
Junior Member
Posts: 14
Joined: 2021-04-30, 14:14 UTC

[Feature Requesst] Add a command `cm_ReloadSettings`

Post by *Troy_Daniel »

For someone who likes to modify the settings file directly, it is a boring thing to close and reopen TC. So it would be great if there is a command `cm_ReloadSettings`.
User avatar
jinsight
Senior Member
Senior Member
Posts: 205
Joined: 2003-02-25, 19:47 UTC
Location: Wooster, Ohio, USA

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Post by *jinsight »

Support++

Such a command would be a little more convenient than starting another instance to see if the setting change was as expected.
License #1945
Windows 10 Pro x64
Version 21H2 (OS Build 19044.1766)
TC 10.0 x64 and x86, Everything 1.5.0.1315a (x64)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 43121
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Post by *ghisler(Author) »

It would be very difficult because not all options are loaded in the same place, some are only loaded when using a specific tool like Search or Lister. Just use a tool like tinny(?)/tiny TC restarter:
http://totalcmd.net/plugring/tinnytcrestarter.html
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 11506
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Post by *petermad »

2Troy_Daniel
I use these two commands to restart TC in the same place as it where, even when auto-save of Directories ase disabled:

Code: Select all

[em_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%

Code: Select all

[em_restartcommander]
cmd=em_newcommander, cm_Exit
button=%COMMANDER_EXE%
menu=Restart Total Commander
Using this command you will lose opened Folder tabs, current Sort order and File spec. etc. if auto-save of Panels is turned off.
License #524 (1994)
Danish Total Commander Translator
TC 10.50b7 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (21H2) 64bit, 'Everything' 1.4.1.1015 (x64)
TC 3.40b2 on Android 6 & 12
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Troy_Daniel
Junior Member
Junior Member
Posts: 14
Joined: 2021-04-30, 14:14 UTC

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Post by *Troy_Daniel »

ghisler(Author) wrote: 2022-05-25, 17:05 UTC not all options are loaded in the same place,
I originally hope to reload the options in `wincmd.ini` and `usercmd.ini` as well as the related redirected options. But here, as suggested by
petermad wrote: 2022-05-25, 23:43 UTC restart TC in the same place as it where
, I think it a good solution. And with some commands added as

Code: Select all

[em_RestartCommander]
cmd=cm_ConfigSavePos, cm_ConfigSaveSettings, cm_ConfigSaveDirHistory, em_NewCommander, cm_Exit
button=%COMMANDER_EXE%
menu=Restart Total Commander
Namely, the `cm_ConfigSavePos, cm_ConfigSaveSettings, cm_ConfigSaveDirHistory, `, however, I'm not sure whether it helps conserve more information. At least, I'm satisfied with this solution. Thank you, all guys.
User avatar
petermad
Power Member
Power Member
Posts: 11506
Joined: 2003-02-05, 20:24 UTC
Location: Valsted, Denmark
Contact:

Re: [Feature Requesst] Add a command `cm_ReloadSettings`

Post by *petermad »

I have found that if I use:

Code: Select all

[em_newcommander]
cmd=%COMSPEC% /C
param=%Z%X start "" "%%COMMANDER_EXE%%" /N /P /A /i="%%COMMANDER_INI%%" %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%
Instead of:

Code: Select all

[em_newcommander]
cmd=%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander
button=%COMMANDER_EXE%
The instance number in TC's title is kept the same, while the second method toggles the instance number back and forth each time the command is run.
License #524 (1994)
Danish Total Commander Translator
TC 10.50b7 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (21H2) 64bit, 'Everything' 1.4.1.1015 (x64)
TC 3.40b2 on Android 6 & 12
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply