Button to open specific directory in left and right panels

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
TimA
Junior Member
Junior Member
Posts: 24
Joined: 2008-05-20, 13:46 UTC
Location: Ottawa, Canada

Button to open specific directory in left and right panels

Post by *TimA »

I'd like to create a button that opens the directory containing

c:\xampp\apache\conf\extra\httpd-vhosts.conf
in the left panel; and

c:\Windows\System32\drivers\etc\hosts
in the right panel.

I can't see how to accomplish this and either I'm not using the correct Search keywords, or this hasn't been asked before.
Thanks.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7025
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

You can make a button like this:

totalcmd.exe /o /l=c:\xampp\apache\conf\extra\httpd-vhosts.conf /r=c:\Windows\System32\drivers\etc\hosts

But this will only position the cursor in both sides to your files.
You can't open them automatically without addional scripts.

I think what you are trying to acomplish is a job for any editor
which allows to open mutiple files from its command line.
User avatar
white
Power Member
Power Member
Posts: 6016
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

help wrote:Start path: Determines the path to be set before the program is started. If no path is given, then the path of the source window is set.
Important: If the command (given in the command box) is cd drive:\directory, then the path given in this edit box is set in the other window! This allows to set both paths (source and target) at the same time.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'd like to add a bit to white's answer: Ctrl+D. :)
TimA
Junior Member
Junior Member
Posts: 24
Joined: 2008-05-20, 13:46 UTC
Location: Ottawa, Canada

Post by *TimA »

Thanks for your replies.
Horst - Thanks but that didn't work for me creating a button within TC, it did work for me as a desktop shortcut.
White - I ended up using CD \path_to_file1 as Command and \path_to_file2 in the Start path
MVV - I didn't really understand Ctrl+D as I've never used the Directory Hotlist before. But I like it a lot :D Now I can do CTRL+D and click on "Hosts" and I get the same results as with White's button.

Conclusion: Total Commander is full of pleasant surprises. The discovery of CTRL+D will allow me to remove a few buttons from my button bar once I have configured my DirectoryHotlist and replace them with a single cm_DirectoryHotlist button.

PS I don't get notifications as I have a Gmail account.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

BTW Start menu is also customizable and supports double-sided CD command. :D

Good Luck!
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

2TimA
Try to use Directory Menu Editor it will make creating the directory menu very easy.
PS I don't get notifications as I have a Gmail account.
This is known issue http://www.ghisler.ch/board/viewtopic.php?t=34109
User avatar
white
Power Member
Power Member
Posts: 6016
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

TimA wrote:Horst - Thanks but that didn't work for me creating a button within TC, it did work for me as a desktop shortcut.
It should work.
User avatar
petermad
Power Member
Power Member
Posts: 16144
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2TimA

Copy and paste this to your button bar:

Code: Select all

TOTALCMD#BAR#DATA
cd c:\xampp\apache\conf\extra\httpd-vhosts.conf

TOTALCMD.EXE,6

c:\Windows\System32\drivers\etc\hosts

-1
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7025
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

TimA wrote:Thanks for your replies.
Horst - Thanks but that didn't work for me creating a button within TC, it did work for me as a desktop shortcut.
May be you did not add the correct path to your totalcmd.exe in front ?
It works perfectly as a button from inside of TC.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is better to replace totalcmd.exe with "%COMMANDER_PATH%\TOTALCMD.exe", this will work 100% with 32-bit TC.
User avatar
HolgerK
Power Member
Power Member
Posts: 5412
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

%COMMANDER_EXE% and it would work with both: 32-Bit and 64-Bit TC Version >=8.0.

;-)
Holger
TimA
Junior Member
Junior Member
Posts: 24
Joined: 2008-05-20, 13:46 UTC
Location: Ottawa, Canada

Post by *TimA »

Thanks everyone!
Post Reply