I want to create a BATCH file, which opens a specified folder with Total Commander. But there are 2 possibility:
I have a code, which opens the folder with TotalCommander, but it always start a new TotalCommander, and not using the running one:
@echo off
SET totalc="C:\totalcmd\TOTALCMD.EXE"
set folder="C:\temp"
ECHO opening %folder% with %totalc%
%totalc% %folder%
ECHO opened
Is there any solution, to resolve this?
@echo off
setlocal
set "totalc=C:\totalcmd\TOTALCMD.EXE"
set "folder=C:\temp"
echo opening "%folder%" with "%totalc%"
"%totalc%" /O /T /R="%folder%"
echo opened
From the documentation
/O If Total Commander is already running, activate it and pass the path(s) in the command line to that instance (overrides the settings in the configuration dialog to have multiple windows)
/R= Set path right window
/T Opens the passed dir(s) in new tab(s) (for usage with /O)