support file:/// URL's

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
compie
Junior Member
Junior Member
Posts: 93
Joined: 2003-07-06, 18:47 UTC

support file:/// URL's

Post by *compie »

Sometimes a copy&paste a filename from the address bar in internet explorer into the command line of total commander.

For example:
cd file:///C:/temp/somefile.html

Unfortunately, this doesn't work directly. I have to remove "file:///" by hand. Please make this work like users expect.
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, compie.
Please make this work like users expect.
So you are users actually. Because I do not expect a syntactically incorrect commandline to yield more than a meaningful error message. :wink:

As a matter of fact, in the commandline
cd file:///C:/temp/somefile.html
you expect TotalCommander to correct 2 syntactical mistakes for you:
(1) "cd" means "change directory", not "jump to a file"
(2) The prefix "file:///" is only used inside browser to indicate that you want to open a locally stored file, not a URL.

I assume you expect this commandline, entered on the TotalCommander commandline, to have the same effect as this one:
cd C:\temp\somfile.html
T.C will change to C:\temp and mark the file "somefile.html".

Note that this commandline will not work if entered at the cmd.exe command prompt at all.

Regards,
Karl
User avatar
HolgerK
Power Member
Power Member
Posts: 5409
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: support file:/// URL's

Post by *HolgerK »

compie wrote:Sometimes a copy&paste a filename from the address bar in internet explorer into the command line of total commander.

For example:
cd file:///C:/temp/somefile.html

Unfortunately, this doesn't work directly. I have to remove "file:///" by hand. Please make this work like users expect.
Add the following to your registry (adapt "c:\\Util\\totalcmd\" to your installation path!):
OpenFileInTC.reg wrote:Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell]

[HKEY_CLASSES_ROOT\*\shell\Open in Total Commander]

[HKEY_CLASSES_ROOT\*\shell\Open in Total Commander\command]
@="c:\\Util\\totalcmd\\totalcmd.exe /O /T /R="%1""
This way you can simply execute (no need for "cd")
TC: command line wrote: file:///C:/temp/somefile.html
to open the folder into TC's right panel, and place the cursor to the given file.

HTH,
Holger

Edit: Sorry my mistake, this works only with non associated files ...
Post Reply