Page 1 of 1

Small change to make cm_CopyNamesToClip even more useful

Posted: 2022-08-27, 12:33 UTC
by kiwerry
Greetings.
The row ".." at the top of each directory list represents that directory. It would be helpful if the command cm_CopyNamesToClip would copy the directory name to the clip when it is executed.
The command cm_CopyFullNamesToClip copies the full name of the directory to the clipboard if the ".." row is selected, so it should be possible for the simple name as well. Currently the "No files selected" error message is displayed, even though the command refers to "name", not "filename".

Re: Small change to make cm_CopyNamesToClip even more useful

Posted: 2022-08-27, 13:17 UTC
by Fla$her
If your goal is to get the name of the parent directory, then what is the point of depending on the selected objects?
Create a button or a custom command for a hotkey based on it:

Code: Select all

TOTALCMD#BAR#DATA
mshta
"javascript:close(clipboardData.setData('text','%B'))"
wciconex.dll,202
Copy parent folder name

1

Code: Select all

TOTALCMD#BAR#DATA
%ComSpec% /q/c >nul chcp 65001&<nul set
/p="%B"|clip
wciconex.dll,202
Copy parent folder name

1

Re: Small change to make cm_CopyNamesToClip even more useful

Posted: 2022-09-03, 16:19 UTC
by Sir_SiLvA
kiwerry wrote: 2022-08-27, 12:33 UTC The row ".." at the top of each directory list represents that directory. It would be helpful if the command cm_CopyNamesToClip would copy the directory name to the clip when it is executed.
Isnt that what cm_CopySrcPathToClip and cm_CopyTrgPathToClip are for?

Re: Small change to make cm_CopyNamesToClip even more useful

Posted: 2022-09-03, 19:25 UTC
by Hacker
Sir_SiLvA,
Those copy the whole path. I assume the request is for the current dir name only.

Roman