Copy path name with forward slash

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
yxz11
Junior Member
Junior Member
Posts: 18
Joined: 2003-11-20, 00:45 UTC

Copy path name with forward slash

Post by *yxz11 »

All,

Is there a function to copy path name with forward slash? I need the functionality like cm_CopyFullNamesToClip, instead of '\' I would like to get '/'. Here is an example:

I have file "c:\temp\test.txt", after cm_CopyFullNamesToClip, I got
"c:\temp\test.txt". Is there a way I can get "c:/temp/test.txt".

I need this for R.

Thanks,
User avatar
Peter
Power Member
Power Member
Posts: 2068
Joined: 2003-11-13, 13:40 UTC
Location: Schweiz

Re: Copy path name with forward slash

Post by *Peter »

yxz11 wrote:...I need this for R....
What is R?

Take a look at List2Clipboard - there are many user-settings
http://www.totalcmd.net/plugring/list2clip.html

Peter
TC 10.xx / #266191
Win 10 x64
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

If you use AHK, this would do it

Code: Select all

;
; TC_backslash2forward.ahk
;
PostMessage, 0x433, 2018, 0,, A
ClipWait
StringReplace, Clipboard, Clipboard, \, /, A
Example Button:
Command
: %ProgramFiles%\AutoHotkey\AutoHotkey.exe "%ProgramFiles%\AutoHotkey\Scripts\TC_backslash2forward.ahk"
janislaw
New Member
New Member
Posts: 1
Joined: 2013-05-20, 06:49 UTC

autohotkey

Post by *janislaw »

I am using custom Total commander keyboard shortcuts ALT+INSERT and ALT+SHIFT+INSERT for cm_CopyNamesToClip and cm_CopyFullNamesToClip (you can set them in Options on Misc tab).
My solution based on previous AHK script is resident and catches ALT+SHIFT+INSERT before forwarding it to Total commander and afterwards it modifies the clipboard.
Here is content of autohotkey script (you can save it to windows Startup folder to keep it running after restart):
#IfWinActive, ahk_class TTOTAL_CMD
!+Insert::
Send !+{Insert}
ClipWait
StringReplace, Clipboard, Clipboard, \, /, A
Post Reply