It would be nice if the current paths and cursorpositions are used - even if saving paths is disabled by user - maybe as CM_EXIT 2The next Total Commander will support restart via command:
CM_EXIT 1
This will start TC with parameter /N after saving paths on exit (if this is enabled by the user). It will also pass parameters /i= and /f= for the ini files if they were passed to the running program. Anything else?
Can you add a cm command to restart TC?
Moderators: Hacker, petermad, Stefan2, white
Re: Can you add a cm command to restart TC?
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
Re: Can you add a cm command to restart TC?
Does TC have such settings?
I agree about the positions of the active and inactive cursors. It would also be useful. But it's still necessary to take into account partially blocked tabs (ignore their settings when restoring) in the context of saving paths (including FS plugins, any virtual folders, network folders, ftp).
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
Configuration --> Operation --> Save on exit --> Directories ?
Re: Can you add a cm command to restart TC?
Understood, forgot about this option.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
Only one: call the default one CM_RESTART so it can be built into menus without having to relay on usercmd.ini please.ghisler(Author) wrote: 2022-10-03, 09:12 UTC The next Total Commander will support restart via command:
CM_EXIT 1
This will start TC with parameter /N after saving paths on exit (if this is enabled by the user). It will also pass parameters /i= and /f= for the ini files if they were passed to the running program. Anything else?
Hoecker sie sind raus!
- ghisler(Author)
- Site Admin
- Posts: 50434
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Can you add a cm command to restart TC?
How should this work? I just runs a new instance, which loads the settings from wincmd.ini saved by the previous instance.returning to directories that were opened in partially blocked tabs.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Can you add a cm command to restart TC?
In my script for such tabs, I executed cm_GotoPreviousDir when starting a new instance.
Since you have more tools to work with different types of directories, you can restore directories from the information stored in memory about them. Or, even better, you can introduce a special directive that for such tabs will work with the current folders as if they did not have a lock, but only when restarting.
In general, it is much easier for you to cope with this qualitatively than using scripts.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50434
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Can you add a cm command to restart TC?
For the current tabs, I just need to pass /L= and/or /R= parameters to the new instance. But for the inactive tabs, there is no such solution. But I will add this if the tabs don't point to plugins.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Can you add a cm command to restart TC?
No, I've been through this for a long time (10 years ago), it won't do. One more time:ghisler(Author) wrote: 2022-10-04, 10:00 UTC For the current tabs, I just need to pass /L= and/or /R= parameters to the new instance.
Fla$her wrote: 2022-10-03, 14:25 UTCBut it's still necessary to take into account partially blocked tabs (ignore their settings when restoring) in the context of saving paths (including FS plugins, any virtual folders, network folders, ftp).
Any return is needed. All of the above, not just regular folders.
Of course, this does not apply to inactive tabs. Only those that are currently displayed in the panels.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50434
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Can you add a cm command to restart TC?
Sorry, this will not be supported.(including FS plugins, any virtual folders, network folders, ftp).
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Can you add a cm command to restart TC?
In that case, it's not interesting. What you suggested with the command-line key substitution has long been done. There is little benefit from this. Well, we will continue to use workarounds. Too bad. There's nothing can do.

Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50434
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Can you add a cm command to restart TC?
Total Commander 10.52 RC1 is available now! CM_EXIT now supports the following parameters:
0 or no parameter: Just exit.
Or sum of:
1: Exit and restart Total Commander
2: Exit and restart, and switch between 32-bit and 64-bit versions (note: 2 and 3 do the same thing)
4: Save directories, tabs and panels (brief, full etc.) even when disabled in settings
4 can be either added to 1 or 2 for restarting, or used for itself to just save the settings.
It does return to directories opened in tabs which are locked but with directory changes allowed. However, it does not restore the scroll position or selected files, there are no parameters to do this and there is no easy way to add it either.
0 or no parameter: Just exit.
Or sum of:
1: Exit and restart Total Commander
2: Exit and restart, and switch between 32-bit and 64-bit versions (note: 2 and 3 do the same thing)
4: Save directories, tabs and panels (brief, full etc.) even when disabled in settings
4 can be either added to 1 or 2 for restarting, or used for itself to just save the settings.
It does return to directories opened in tabs which are locked but with directory changes allowed. However, it does not restore the scroll position or selected files, there are no parameters to do this and there is no easy way to add it either.
You can still use your own method if you need more. This is meant for the majority of users who just want to restart the program quickly without the need for any external software.In that case, it's not interesting.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Can you add a cm command to restart TC?
And what are the difficulties here? The names of the two objects under the cursor to pass in /P /L= for you just a cakewalk.ghisler(Author) wrote: 2022-10-04, 16:22 UTC However, it does not restore the scroll position or selected files, there are no parameters to do this and there is no easy way to add it either.
To each according to his need. I understand. But I have to do it with insufficiently reliable and full-fledged methods. And you can implement it as efficiently as possible with simple tab management directives. For example, commit the lock paths in memory, execute 3919/cm_ToggleLockCurrentTab, and at startup return the lock status with the old paths.ghisler(Author) wrote: 2022-10-04, 16:22 UTC You can still use your own method if you need more. This is meant for the majority of users who just want to restart the program quickly without the need for any external software.
Overquoting is evil! 👎
Re: Can you add a cm command to restart TC?
2ghisler(Author)
Please add some message when restarting (like TCFS2.exe /ef msg(88888,0,0) ), so that it can be used in autorun.cfg to allow closing Everything only with simple exit (i.e. without flags 1 or 2).
Everything loads the system very much with database checking and indexing, so it is impractical to terminate it when restarting.
Please add some message when restarting (like TCFS2.exe /ef msg(88888,0,0) ), so that it can be used in autorun.cfg to allow closing Everything only with simple exit (i.e. without flags 1 or 2).
Code: Select all
SetMessageAction 88888 Restart = 1
Pragma AutorunFinalizeSection
If Not Restart Then ProcessTerminate /F /A '%COMMANDER_PATH%\Utils\Everything\Everything.exe'
Overquoting is evil! 👎
-
- Junior Member
- Posts: 79
- Joined: 2022-06-16, 23:37 UTC
Re: Can you add a cm command to restart TC?
2Fla$her
Therefore, I do as I described earlier:
At the first launching of the TC, all the applications I need are launched and are constantly in the tray. They do not depend of TC restarts in any way.
Therefore, I do as I described earlier:
At the first launching of the TC, all the applications I need are launched and are constantly in the tray. They do not depend of TC restarts in any way.