Back to home - bring TC after work back to an initial state

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Lemony
Junior Member
Junior Member
Posts: 3
Joined: 2022-03-15, 15:56 UTC

Back to home - bring TC after work back to an initial state

Post by *Lemony »

After I used Total Commander to do some stuff I would like to clean things up. By cleaning things up I mean close all tabs and go back to a default view i.e. on the left and right pane show the "This PC" view.

How do I achieve this? Currently, I manually close all tabs and navigate to the place but I find this a bit cumbersome. Is there a quicker way to go back to "home"?
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Re: Back to home - bring TC after work back to an initial state

Post by *Gral »

1. Save your desired clean state to TAB file - right click on tab - "Save tabs on both sides to file"
2. Make button with OPENTABS command and pathname of your TAB file as a parameter.
Done.
Use button to reload saved "clean" tabs.
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3896
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Back to home - bring TC after work back to an initial state

Post by *sqa_wizard »

The easiest way is to create the initial "home" status at TC.
- Then do a right mouse click on a tab
- Select entry "Save tabs on both sides to file"
- Save it to "%COMMANDER_PATH%\TABS\home.tab"

Next create a button (just copy below lines and paste it to your button bar):

Code: Select all

TOTALCMD#BAR#DATA
OPENTABS %COMMANDER_PATH%\TABS\home.tab

wciconex.dll,83
Open clean TC

0
-1
A click on this button will restore the "home" setup next time :-)
#5767 Personal license
User avatar
funkymonk
Senior Member
Senior Member
Posts: 499
Joined: 2013-12-04, 09:56 UTC

Re: Back to home - bring TC after work back to an initial state

Post by *funkymonk »

For a really cleaned up TC, I recommend to simply restart it.

This can be simplified with two user commands in usercmd.ini ...

Code: Select all

[em_NewAdminTC]
cmd=*%COMMANDER_EXE% /N
param=
menu=Open new instance of Total Commander as Admin
button=%COMMANDER_EXE%

[em_RestartTCAsAdmin]
cmd=em_NewAdminTC, cm_Exit
button=%COMMANDER_EXE%
menu=Restart Total Commander as Admin
... and a new keybinding in wincmd.ini ...

Code: Select all

[Shortcuts]
CS+L=em_RestartTCAsAdmin
Then, Ctrl+Shift+L will simply restart TC (start a new instance and end the old one). Of course, you can also create a button in the button bar.
If you don't want TC to restart in admin mode, just remove the * in em_NewAdminTC.

Hope this helps.

BR
funkymonk.
Lemony
Junior Member
Junior Member
Posts: 3
Joined: 2022-03-15, 15:56 UTC

Re: Back to home - bring TC after work back to an initial state

Post by *Lemony »

Thank you for the responses, I went with the button and the home tabs. Which is great and works as expected.

I also tried to set the /L= and /R= command line parameters to "\\This PC\" such that when I open Total Commander, I have the tabs they way I want them. When I do this however, I get the error "Drive not found!". Do you know why that is the case as the path to the home directory works as expected with the button?
User avatar
petermad
Power Member
Power Member
Posts: 16116
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Back to home - bring TC after work back to an initial state

Post by *petermad »

2Lemony
I also tried to set the /L= and /R= command line parameters to "\\This PC\"
TC does not support paths to virtual folders like "\\This PC\" in command line and in command fields for buttons and em_commands

You can try to replace \\This PC\ with ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}
Last edited by petermad on 2022-03-16, 13:00 UTC, edited 2 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Lemony
Junior Member
Junior Member
Posts: 3
Joined: 2022-03-15, 15:56 UTC

Re: Back to home - bring TC after work back to an initial state

Post by *Lemony »

Cool this works, thanks a lot. I tried it already before because I saw it in the saved tabs folder but I didn't add the two :: in front and then it didn't work as expected but with the dots everything works like a charm.
Post Reply