Command-line: open path in active panel?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Beano
Junior Member
Junior Member
Posts: 71
Joined: 2006-02-18, 10:55 UTC

Command-line: open path in active panel?

Post by *Beano »

Is it possible to pass a path via command-line to open the path in the active
panel?


For example :

"c:\Program Files (x86)\TotalCommander\TOTALCMD.EXE" /O c:\Some Folder\


The above will always open c:\Some Folder in the left panel, even if the right panel is active in TC.

Thanks in advance.
User avatar
petermad
Power Member
Power Member
Posts: 16034
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

This should do it:

Code: Select all

%COMMANDER_EXE% /O /S c:\Some Folder\
If you want to always open the folder in the INactive panel use:

Code: Select all

%COMMANDER_EXE% /O /S /R=c:\Some Folder\
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
Beano
Junior Member
Junior Member
Posts: 71
Joined: 2006-02-18, 10:55 UTC

Post by *Beano »

Awesome - that works :)

Mange tak!
pkutaj
New Member
New Member
Posts: 1
Joined: 2020-12-18, 07:59 UTC

Re: Command-line: open path in active panel?

Post by *pkutaj »

My small PowerShell function to open TC from present working directory just by pressing `tc` — just add to $profile, edit as necessary

Code: Select all

function start-totalCommanderhere {
    $here = (Get-Location).path
    kill -n TOTALCMD64 -ErrorAction Ignore
    start "c:\totalcmd\TOTALCMD64.EXE" $here
}
set-alias tc start-totalCommanderhere
Post Reply