cm_CopyFullNamesToClip without final slash

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

cm_CopyFullNamesToClip without final slash

Post by *Hurdet »

When i use cm_CopyFullNamesToClip on a directory i obtain
c:\one\two\
to it is possible to obtain instead more used
c:\one\two
?
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Single user license #329241
PowerPro scripts for Total Commander
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka/Makiivka
Contact:

Post by *LonerD »

AutoHotkey script (parameter %L):

Code: Select all

Loop, read, %1%
{
    Current_String = %A_LoopReadLine%
    StringRight, Right_Simbol, Current_String, 1
    If Right_Simbol = \
        If ( %2% = TrimSlash OR  %2% = ts )
            StringTrimRight, Current_String, Current_String, 1
    If My_List =
        My_List = %Current_String%
    Else
        My_List = %My_List%`n%Current_String%
}
clipboard = %My_List%
User avatar
HolgerK
Power Member
Power Member
Posts: 5411
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

http://www.totalcmd.net/plugring/list2clip.html
... The backslash at the end of the path can be omitted. ...
Regards
Holger
Post Reply