Open a folder using a keyboard-key

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
FVG
Junior Member
Junior Member
Posts: 69
Joined: 2006-12-14, 19:11 UTC
Location: Mol - Antwerpen - Belgie

Open a folder using a keyboard-key

Post by *FVG »

Hello,
I'm using a Logitech K330 with programmable keys.
I want to assign one of the keys to open a specific folder on the left site of my running TC11.
I have tried this command:
"C:\program files\Wincmd\totalcmd64.exe" "/L=E:\Box Sync\HelpDesk\Documentenwijzer\"
but that starts a new session of TC instead of opening the folder in my running session.
Is it possible to become this and how?
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Open a folder using a keyboard-key

Post by *white »

/O
Have you checked the help about command line parameters?
FVG
Junior Member
Junior Member
Posts: 69
Joined: 2006-12-14, 19:11 UTC
Location: Mol - Antwerpen - Belgie

Re: Open a folder using a keyboard-key

Post by *FVG »

@ white
Sorry forgot to type it in my above post
The correct one is: "C:\program files\Wincmd\totalcmd64.exe" /O=0 "/L=E:\Box Sync\HelpDesk\Documentenwijzer\"
But the result was still a new window.
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Open a folder using a keyboard-key

Post by *hi5 »

Just /O will do, not /O=0

edit: typo and see " remark below
Last edited by hi5 on 2024-02-17, 08:39 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)
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open a folder using a keyboard-key

Post by *petermad »

2FVG

Don't put the " before /L but put it after the = - as here:

"C:\program files\Wincmd\totalcmd64.exe" /O /L="E:\Box Sync\HelpDesk\Documentenwijzer\"
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: Open a folder using a keyboard-key

Post by *Fla$her »

FVG wrote: 2024-02-16, 15:17 UTC I want to assign one of the keys to open a specific folder on the left site of my running TC11.
Do you want to do this when the TC window is active or not?

hi5 wrote: 2024-02-16, 21:29 UTC Just /0 will do, not /0=0
No. /O or /O0, but not /0.
/O0 logically works faster, as it doesn't require additional checks.
Overquoting is evil! 👎
FVG
Junior Member
Junior Member
Posts: 69
Joined: 2006-12-14, 19:11 UTC
Location: Mol - Antwerpen - Belgie

Re: Open a folder using a keyboard-key

Post by *FVG »

@Fla$her
TEST1
The command: "C:\program files\Wincmd\totalcmd64.exe" /O /L="E:\Box Sync\HelpDesk\Documentenwijzer\"
Result: a new TC window is opened with the correct folder on the left site

TEST2
The command: "C:\program files\Wincmd\totalcmd64.exe" /O0 /L="E:\Box Sync\HelpDesk\Documentenwijzer\"
Result: on the active TC window but without a folder-change on the left site

What I want is the folder indicated with the L-parameter on the left site of the current active TC window
User avatar
Dalai
Power Member
Power Member
Posts: 9393
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Open a folder using a keyboard-key

Post by *Dalai »

2FVG
Did you test without the trailing backslash?
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Open a folder using a keyboard-key

Post by *white »

FVG wrote: 2024-02-17, 15:22 UTC TEST1
The command: "C:\program files\Wincmd\totalcmd64.exe" /O /L="E:\Box Sync\HelpDesk\Documentenwijzer\"
Result: a new TC window is opened with the correct folder on the left site
The already running TC window is running as administrator?
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Open a folder using a keyboard-key

Post by *Fla$her »

FVG wrote: 2024-02-17, 15:22 UTC What I want is the folder indicated with the L-parameter on the left site of the current active TC window
If that's the case, why don't you want to use the TC interface to bind hotkeys?
In this case, you won't have the problems described with the difference in launch permissions.
And best of all, you'll be able to use faster tools without having to create a temporary TC process:
  1. cm_FocusLeft,cm_Wait 40,cd "C:\path to\"
  2. TCFS2.exe /ef "tcd(`C:\path to`) tcm(4001)"
  3. TCMC.exe CD "C:\path to" "" CM4001
Overquoting is evil! 👎
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Open a folder using a keyboard-key

Post by *petermad »

The already running TC window is running as administrator?
That's the most likely reason.


2FVG
It you are running TC as Administrator, you also have to open with yor left folder choice as administrator. If you use a button in TC, then put an asterisk (*) in front of the command,ifI you open via a link on the desktop,then configure the link to start as Administrator.
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
FVG
Junior Member
Junior Member
Posts: 69
Joined: 2006-12-14, 19:11 UTC
Location: Mol - Antwerpen - Belgie

Re: Open a folder using a keyboard-key

Post by *FVG »

@ Fla$her
I give it a try; Thanks.
Post Reply