Start TC with "Default tabs"

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
kodepr
Junior Member
Junior Member
Posts: 38
Joined: 2019-09-05, 08:13 UTC

Start TC with "Default tabs"

Post by *kodepr »

Hi,

Is there a way I can make TC always start with a set of "Default tabs" in both the left and right pane?
I remember having read a thread about something like that, but I can't find it anymore.

If I remember correctly, it said that first you had to save the "Default tabs" to a .tab file, and then you had to make TC "trigger" a "Load tabs from file, replace tabs" on startup.

Anyone know/remember how this could be done?
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Start TC with "Default tabs"

Post by *hi5 »

Edit: it is possible to load a .tab file and it is documented, see command line Drive:\Directory section

I don't think it is possible yet to load a tab file yet via the cmdline options, but you could create a batch file that simply launches TC and create the tabs you want (save as "tcstart.cmd" for example; adjust paths of course)

Code: Select all

Start c:\totalcmd\totalcmd.exe /O /T /L=c:\totalcmd
rem to give TC some time to start we use timeout
TimeOut /T 1 
Start c:\totalcmd\totalcmd.exe /O /T /L=c:\windows
There is an old request/suggestion here viewtopic.php?t=21897

/L= Set path in left window
/R= Set path right window
/O If Total Commander is already running, activate it and pass the path(s) in the command line to that instance
/T Opens the passed dir(s) in new tab(s).

See "Command line parameters" in the help for more options
Last edited by hi5 on 2023-12-05, 07:31 UTC, edited 1 time in total.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Start TC with "Default tabs"

Post by *Fla$her »

kodepr wrote: 2023-12-04, 10:33 UTC Anyone know/remember how this could be done?
Yes, this is done simply using Autorun (installation). autorun.cfg must contain the string:
CommandExec em_OPENTABS '%COMMANDER_PATH%\Tabs\Default.tab'

, where em_OPENTABS consists of OPENTABS and %A for the first and second fields.
Tabs are easiest to save by executing SAVETABS2L "%COMMANDER_PATH%\Tabs\Default.tab".
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Start TC with "Default tabs"

Post by *petermad »

2kodepr
Set up the tabs you want to start with.
in the Menu choose "Configuration" -> "Save setings".
in the Menu choose "Configuration" -> "Options..." -> "Operation" -> "Save on exit" DISABLE "Directories" - then TC will always start with the same Folder Tabs, with the same directories in them.
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
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Start TC with "Default tabs"

Post by *Fla$her »

2petermad
Curiously. I have never used disabling this option unnecessarily. It turns out that even after using OPENTABS, the old tabs are returned.
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14808
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Start TC with "Default tabs"

Post by *petermad »

2kodepr

If you don't want to disable saving of directories at exit, you can also instead save your preferred Folder tabs by right-clicking on a tab and choose "Save tabs on both sides to file" - for example to starttabs.tab

You can then start TC with the tab file as parameter:

Code: Select all

drive:\path\totalcmd64.exe /S drive:\path\starttabs.tab
But the effect will be the same as disabling saving directories on exit.

/S makes sure that the tabs are placed in the correct sides if the command is run from inside TC with focus on the right panel.
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