New command cm_CopyWebNamesToClip

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
alphalpha
Junior Member
Junior Member
Posts: 3
Joined: 2009-07-29, 11:44 UTC

New command cm_CopyWebNamesToClip

Post by *alphalpha »

An additional command named "cm_CopyWebNamesToClip" or similar would be nice, which works the same as cm_CopyNetNamesToClip, but replaces special characters into the corresponding %nn escape sequences like used in URLs, e.g. for a file "\\server\dir\file name.ext" the string "\\server\dir\file%20name.ext" would be copied (not all %nn codes would have to be supported, but space = %20 would have to be supported at least).

E.g., this would enable easy creation of clickable links in e-mails, although the path contains spaces.

-Alphalpha
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: New command cm_CopyWebNamesToClip

Post by *HolgerK »

alphalpha wrote:E.g., this would enable easy creation of clickable links in e-mails, although the path contains spaces.
I doubt that this would be usefull for your purpose, because both names:
"\\server\dir\file name.ext"
"\\server\dir\file%20name.ext"
are valid, but different UNC paths!

Uniform Resource Locator != Uniform Naming Convention

Regards
Holger
alphalpha
Junior Member
Junior Member
Posts: 3
Joined: 2009-07-29, 11:44 UTC

Re: New command cm_CopyWebNamesToClip

Post by *alphalpha »

HolgerK wrote:I doubt that this would be usefull for your purpose, because both names:
"\\server\dir\file name.ext"
"\\server\dir\file%20name.ext"
are valid, but different UNC paths!
First: I didn't call the wanted result UNC path.

Second: At least Outlook will open "\\server\dir\file name.ext" when the link says "\\server\dir\file%20name.ext" (this is basically what I want to have).
If I paste "\\server\dir\file name.ext" into an e-mail, it will not become a proper clickable link (regardless whether enclosed in quotation marks or not), but the clickable link will end at the first space... and in my example "\\server\dir\file" is just junk and will not open anything when clicked.

At least for me it would be convenient if there would be a way that Total Commander replaces the spaces, by hand it is tedious and fault-prone. And I can't imagine that the scenario I describe is that exotic (never sent a link to a file or directory on a LAN file server to a colleague?).

Implementation should be very easy, and if you find the proposed function name misleading, I wouldn't care about its name as long as it would work for me.

-Alphalpha
User avatar
HolgerK
Power Member
Power Member
Posts: 5406
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Re: New command cm_CopyWebNamesToClip

Post by *HolgerK »

alphalpha wrote:First: I didn't call the wanted result UNC path.
It is an UNC path!
Second: At least Outlook will open "\\server\dir\file name.ext" when the link says "\\server\dir\file%20name.ext" (this is basically what I want to have).
Which of the two different files placed on the local server will be opened by Outlook?
If I paste "\\server\dir\file name.ext" into an e-mail, it will not become a proper clickable link
How to Insert a File Hyperlink in an Outlook Item
Or just use the menu "Insert hyperlink" and paste the UNC path from the clipboard into the dialog.
(never sent a link to a file or directory on a LAN file server to a colleague?).
I'm doing this very often(also using Outlook), and never needed such a feature in TC.
I wouldn't care about its name as long as it would work for me.
That's exactly what i doubt.

Please create two different files on your network share:
one with space and one with %20 (e.g. "Test%20Test.doc" )
Insert your %20-link into a mail an try to open "Test Test.doc".

Kind regards
Holger

Edit: just tested with Outlook2007

It seems that microsoft really replaces the %20 with space. As a result, not valid link to a filename containing %20 can be created. :twisted: Bravo MS, just another reason to stay @home with Thunderbird. :twisted:

2alphalpha
Another way to create a valid link in Outlook mails is to drag the file with the right mouse button, drop it into Outlook, and select "create hyperlink here" from the context menu.

And to complete your suggestion:
A cm_CopyAsHyperLinkToClip (file:///Server/dir/File%20name.ext)
would be a better solution.
alphalpha
Junior Member
Junior Member
Posts: 3
Joined: 2009-07-29, 11:44 UTC

Re: New command cm_CopyWebNamesToClip

Post by *alphalpha »

I am sorry, I missed to write something important, the prefix "file:".

A click on "file:\\server\share\Test%20text.txt" (with or without quotes) in an Outlook e-mail (or entering it in IE address bar or Windows Explorer address bar) will actually open the file "\\server\share\Test text.txt", whereas "\\server\share\Test text.txt" will also work in IE and Explorer, but does not work in Outlook (because of the space which Outlook interprets as the end of the link).

Your are right, just "\\server\share\Test%20text.txt" will point to a different file. Because of this very different behaviour when using the "file:" prefix I meant that the path in "file:\\server\share\Test%20text.txt" is not interpreted as a UNC path.

Sorry for causing confusion.

-Alphalpha

Edit: just read your last post
"cm_CopyAsHyperLinkToClip" (file:///Server/dir/File%20name.ext) is exactly what I need.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Try to search for
ninotech path copy
(e.g. via Google), it seems to do what you need via the right click context menu.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

...or the good old List2Clipboard
http://www.lefteous.de/tc/lst2clip_eng.htm
Post Reply