Open file's/directory's path from Explorer in TC and highlight it

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Notme
Junior Member
Junior Member
Posts: 14
Joined: 2011-06-02, 09:05 UTC

Open file's/directory's path from Explorer in TC and highlight it

Post by *Notme »

Hello!

I'd like to have Total Commander in the Explorer's context menu for both files and directories.
In both cases I'd like to have a menu item which would open the path in TC.
If the context menu was invoked on a file, then that file should be highlighted in TC, e.g. the cursor (not mouse, but the "frame" in TC) should be on that file.
Optimally I'd also be able to specify whether to show the file/dir on the left, or right side (maybe one menu item for each side).

I am aware of the https://www.ghisler.ch/wiki/index.php/Explorer_integration and I've been playing a bit with it, but I've only achieved opening a directory in TC.

Can someone help?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *Horst.Epp »

The perfect tool for this is
https://totalcmd.net/plugring/tcshell.html
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *Dalai »

I'm using something like this:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\TotalCmd]
@="Total Commander (32 bit)"

[HKEY_CLASSES_ROOT\*\shell\TotalCmd\command]
@="\"C:\\Program Files (x86)\\Total Commander\\totalcmd.exe\" /N /A \"%1\""

[HKEY_CLASSES_ROOT\Directory\shell\TotalCmd]
@="Total Commander (32 bit)"

[HKEY_CLASSES_ROOT\Directory\shell\TotalCmd\command]
@="\"C:\\Program Files (x86)\\Total Commander\\totalcmd.exe\" /N \"%1\""
This shows TC in the context menu of files and directories, and using the context menu item of a file opens the directory the file is in and sets the cursor onto this file.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Notme
Junior Member
Junior Member
Posts: 14
Joined: 2011-06-02, 09:05 UTC

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *Notme »

Thank you for the suggestions. I ended up with:

Code: Select all

[HKEY_CLASSES_ROOT\*\shell\TC open in LEFT panel]

[HKEY_CLASSES_ROOT\*\shell\TC open in LEFT panel\command]
@="c:\\totalcmd\\TOTALCMD64.EXE /O /A /T /L=\"%1\""

[HKEY_CLASSES_ROOT\*\shell\TC open in RIGHT panel]

[HKEY_CLASSES_ROOT\*\shell\TC open in RIGHT panel\command]
@="c:\\totalcmd\\TOTALCMD64.EXE /O /A /T /R=\"%1\""

[HKEY_CLASSES_ROOT\Directory\shell\TC open in LEFT panel]

[HKEY_CLASSES_ROOT\Directory\shell\TC open in LEFT panel\command]
@="c:\\totalcmd\\TOTALCMD64.EXE /O /T /L=\"%1\""

[HKEY_CLASSES_ROOT\Directory\shell\TC open in RIGHT panel]

[HKEY_CLASSES_ROOT\Directory\shell\TC open in RIGHT panel\command]
@="c:\\totalcmd\\TOTALCMD64.EXE /O /T /R=\"%1\""
which is almost exactly what I had in mind.
I've been trying to make these into sub-menus, following this https://docs.microsoft.com/en-us/windows/win32/shell/creating-static-cascading-menus terribly hopeless guide without any luck and so I've decided not to waste more time on that.

However if someone knows how to do it, please share the knowledge.
NotNull
Senior Member
Senior Member
Posts: 266
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *NotNull »

Notme wrote: 2020-01-22, 13:57 UTC However if someone knows how to do it, please share the knowledge.
Although I got that working (years ago and indeed: after a lot of trying), there is a simpler way.
It is converted from something I use and adapted to your situation (but not tested).
This is the context menu for the currently logged on user. If you want it for all users, replace HKCU with HKLM

Code: Select all

Windows Registry Editor Version 5.00

;==========[ SUBMENU ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu]
"subcommands"=""
"MUIVerb"="Open in &Total Commander (32 bit)"
"Icon"="\"c:\\totalcmd\\TOTALCMD64.EXE\""

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell]

;==========[ LEFT PANE ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Left]
"MUIVerb"=".. in the &LEFT pane"

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Left\Command]
@="\"c:\\totalcmd\\TOTALCMD64.EXE\" /O /A /T /L=\"%1\""


;==========[ RIGHT PANE ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Right]
"MUIVerb"=".. in the &RIGHT pane"

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Right\Command]
@="\"c:\\totalcmd\\TOTALCMD64.EXE\" /O /A /T /R=\"%1\""

tony01
Junior Member
Junior Member
Posts: 35
Joined: 2003-09-13, 13:19 UTC

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *tony01 »

It doesn't work.
I don't see a context menu when I right-click a dir in Win explorer.
Please fix it and test it, before posting.
Thanks
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *Hacker »

tony01,
I don't see a context menu when I right-click a dir in Win explorer.
This is very strange. I definitely do.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
tony01
Junior Member
Junior Member
Posts: 35
Joined: 2003-09-13, 13:19 UTC

Re: Open file's/directory's path from Explorer in TC and highlight it

Post by *tony01 »

Roman:
I am talking about "NotNull" registry file that he posted, I changed the TC path in my computer, and I added it to the registry, but it does not work.
I don't see a context menu when I right-click a dir in Win explorer. I don't know what is wrong. HELP PLEASE. :roll: :roll:
see below:

Windows Registry Editor Version 5.00

;==========[ SUBMENU ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu]
"subcommands"=""
"MUIVerb"="Open in &Total Commander (32 bit)"
"Icon"="\"c:\\Total Commander\\Totalcmd64.exe\""

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell]

;==========[ LEFT PANE ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Left]
"MUIVerb"=".. in the &LEFT pane"

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Left\Command]
@="\"c:\\Total Commander\\Totalcmd64.exe\" /O /A /T /L=\"%1\""


;==========[ RIGHT PANE ]==========================

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Right]
"MUIVerb"=".. in the &RIGHT pane"

[HKEY_CURRENT_USER\Software\Classes\*\Shell\TCmenu\Shell\TC.Right\Command]
@="\"c:\\Total Commander\\Totalcmd64.exe\" /O /A /T /R=\"%1\""
Post Reply