Code: Select all
[em_LocateItem]
cmd=cd
param=%Z%A\:
But if a folder path is passed in, such as when using the command cm_CopyFullNamesToClip, it will enter the folder, and the last \ from the folder path needs to be manually removed for it to work.
Moderators: Hacker, petermad, Stefan2, white
Code: Select all
[em_LocateItem]
cmd=cd
param=%Z%A\:
Of course, it can be handled manually, but it would be even better if TC itself is compatible.Fla$her wrote: 2025-04-17, 20:22 UTC You manually insert the path. Why not do something else manually? ¯\_(ツ)_/¯
Code: Select all
TOTALCMD#BAR#DATA
mshta.exe "javascript:with(new ActiveXObject('Scripting.FileSystemObject')){clipboardData.setData('text',
openTextFile(getSpecialFolder(2)+'\\'+'%WL'.replace(/.+(?=CMD\w+\.tmp$)/,''),1,0,-1).readAll().slice(0,-2).replace(/[/\\](?=\r|$)/g,''))};close()"
wcmicon2.dll,45
Copy full names without trailing (back)slash
1
Code: Select all
# cm_CopyNamesToClipNS
RegisterCommand 80000 CopyNamesWithoutTrailingSlash
# cm_CopyFullNamesToClipNS
RegisterCommand 80001 CopyNamesWithoutTrailingSlash 1
# cm_CopyNetNamesToClipNS
RegisterCommand 80002 CopyNamesWithoutTrailingSlash 4
# cm_CopyPathOfFilesToClipNS
RegisterCommand 80003 CopyNamesWithoutTrailingSlash 1018
Func CopyNamesWithoutTrailingSlash(lParam, Opt=0)
SendCommand(2017 + Opt, 0, 1)
Local Clip = ClipGet()
If Clip <> '' Then
If StrPos('\/', StrRight(Clip, 1)) Then Clip = StrLeft(Clip, StrLen(Clip) - 1)
If StrPos(Clip, '\') Then
ClipPut(StrReplace(Clip, '\' & auCR, auCR))
ElseIf StrPos(Clip, '/') Then
ClipPut(StrReplace(Clip, '/' & auCR, auCR))
EndIf
EndIf
EndFunc