Page 1 of 1

support file:/// URL's

Posted: 2008-07-07, 11:48 UTC
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.

Posted: 2008-07-07, 12:06 UTC
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

Re: support file:/// URL's

Posted: 2008-07-07, 12:42 UTC
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 ...