Nope. This commands also navigates the dialog to TC's path. In some tree dialogs, it displays a notification about not being able to execute the command due to Windows limitations. In such case, the only quick way to tell the app about the path I want is to manually copy TC's current path from TC itself, which is basically the "cm_CopySrcPathToClip" command.Horst.Epp wrote: 2018-10-16, 07:06 UTCThe default QAP hotkey for this is Shift-Ctrl-CFreodon wrote: 2018-10-15, 19:53 UTC So I started using Quick Access Popup pand it works well... most of the time. Sometimes in tree view it won't let me auto-navigate and paste the path while manually entering the path would actually solve current task. So for such exceptions I still need the TC command...
Or maybe there is a way to just paste current path (without navigating) in QAP?
which can be configured by adding the QAP feature "Reopen Current Folder in Dialogbox"
to your favorites.
"cm_CopySrcPathToClip" ending with backslash
Moderators: Hacker, petermad, Stefan2, white
Re: "cm_CopySrcPathToClip" ending with backslash
Re: "cm_CopySrcPathToClip" ending with backslash
Freodon wrote: I frequently use TC to navigate to a directory and then use the "cm_CopySrcPathToClip" command
to copy a path to clipboard, then paste it in another application to choose a directory within that app .
The problem is, the "cm_CopySrcPathToClip" command copies the path without a backslash at the end
(for example: "d:\dir1\dir2" instead of "d:\dir1\dir2\").
..., the only quick way to tell the app about the path I want
is to manually copy TC's current path from TC itself,
which is basically the "cm_CopySrcPathToClip" command.
Click into the box with the path to edit it (or utilize Rename on '..') and then copy it.
Or create your own command:
usercmd.ini
[em_CopySrcPathWithBSToClip]
cmd=CMD /c
param=ECHO %P|CLIP
iconic=1
wincmd.ini
[Shortcuts]
S+P=em_CopySrcPathWithBSToClip ;//Shift+P to copy current path to clipboard (for example: "d:\dir1\dir2\").
For more help see
Collection of English FAQs threads >>> viewtopic.php?p=347043#p347043
or just ask.
Re: "cm_CopySrcPathToClip" ending with backslash
There is no need for any tree dialog to change dirs in a app for me.Freodon wrote: 2018-10-16, 16:42 UTCNope. This commands also navigates the dialog to TC's path. In some tree dialogs, it displays a notification about not being able to execute the command due to Windows limitations. In such case, the only quick way to tell the app about the path I want is to manually copy TC's current path from TC itself, which is basically the "cm_CopySrcPathToClip" command.Horst.Epp wrote: 2018-10-16, 07:06 UTCThe default QAP hotkey for this is Shift-Ctrl-CFreodon wrote: 2018-10-15, 19:53 UTC So I started using Quick Access Popup pand it works well... most of the time. Sometimes in tree view it won't let me auto-navigate and paste the path while manually entering the path would actually solve current task. So for such exceptions I still need the TC command...
Or maybe there is a way to just paste current path (without navigating) in QAP?
which can be configured by adding the QAP feature "Reopen Current Folder in Dialogbox"
to your favorites.
I just use the hotkey to get the TC path in any Open / Save dialog and it changes to the dir I want.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.55 RC1 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: "cm_CopySrcPathToClip" ending with backslash
Thank you. that command should be very useful. I only have one small issue with it: when I paste the path in Notepad, Word etc. it adds a new line character at the end. Any way to bypass this?Stefan2 wrote: 2018-10-16, 17:37 UTCFreodon wrote: I frequently use TC to navigate to a directory and then use the "cm_CopySrcPathToClip" command
to copy a path to clipboard, then paste it in another application to choose a directory within that app .
The problem is, the "cm_CopySrcPathToClip" command copies the path without a backslash at the end
(for example: "d:\dir1\dir2" instead of "d:\dir1\dir2\").
..., the only quick way to tell the app about the path I want
is to manually copy TC's current path from TC itself,
which is basically the "cm_CopySrcPathToClip" command.
Click into the box with the path to edit it (or utilize Rename on '..') and then copy it.
Or create your own command:
usercmd.ini
[em_CopySrcPathWithBSToClip]
cmd=CMD /c
param=ECHO %P|CLIP
iconic=1
wincmd.ini
[Shortcuts]
S+P=em_CopySrcPathWithBSToClip ;//Shift+P to copy current path to clipboard (for example: "d:\dir1\dir2\").
For more help see
Collection of English FAQs threads >>> viewtopic.php?p=347043#p347043
or just ask.
Re: "cm_CopySrcPathToClip" ending with backslash
This can not be handled, because me think that is added by TC additionally after our calculated output. (any other opinions?)Freodon wrote: 2018-10-17, 10:42 UTC ...I only have one small issue with it: when I paste the path in Notepad, Word etc. it adds a new line character at the end. Any way to bypass this?
But we can modify the output in the clipboard, removing the trailing newline there.
That needs a tool who have good clipboard access, like AutoHotkey.
So we would need AutoHotkey.exe and a external script file, if that's fine with you.
- Zaytsev Artem
- Junior Member
- Posts: 2
- Joined: 2015-01-28, 23:12 UTC
Re: "cm_CopySrcPathToClip" ending with backslash
Let me be a necromancer a bit, but i believe it could help someone else.
AutoHotKey is a genious tool, i use it widely and love it but come on! Man asks for a simple solution which AHK is definitely not.
To avoid the CRLF you should use a "set/p=%P" trick.
But this will not be enough because of another problem:
If the path contains some unicode characters - the resulting string in the clipboard will loose them (the characters will be transformed to ANSI closest equivalents).
To overcome this issue we can add a chcp command to set the utf-8 codepage.
The final strings in the usercmd.ini will be:
You're a welcome 
AutoHotKey is a genious tool, i use it widely and love it but come on! Man asks for a simple solution which AHK is definitely not.
It's because of the echo batch-command.
To avoid the CRLF you should use a "set/p=%P" trick.
But this will not be enough because of another problem:
If the path contains some unicode characters - the resulting string in the clipboard will loose them (the characters will be transformed to ANSI closest equivalents).
To overcome this issue we can add a chcp command to set the utf-8 codepage.
The final strings in the usercmd.ini will be:
Code: Select all
[em_CopySrcPathWithBSToClip]
cmd=cmd /c
param=chcp 65001 & echo|set/p=%P|clip
iconic=1

Re: "cm_CopySrcPathToClip" ending with backslash
Hi Zaytsev Artem and welcome to your first posting.
Thanks for that trick, seems to work pretty well.
- - -
Original problem:
The problem is, the "cm_CopySrcPathToClip" command copies the path without a backslash at the end.
Solution:
This work around (CopySrcPathWithBSToClip) copies the path
by utilizing the TC parameter %P, which includes the backslash at the end,
and the "set /p" trick doesn't add an trailing line break to that echo dos command.
Find me: CopySrcPathWithBSToClip CopySrcPathWithTrailingBackSlashToClipboard Copy Source Path With Trailing BackSlash To Clipboard
Thanks for that trick, seems to work pretty well.
- - -
Original problem:
The problem is, the "cm_CopySrcPathToClip" command copies the path without a backslash at the end.
Solution:
This work around (CopySrcPathWithBSToClip) copies the path
by utilizing the TC parameter %P, which includes the backslash at the end,
and the "set /p" trick doesn't add an trailing line break to that echo dos command.
Code: Select all
TOTALCMD#BAR#DATA
cmd /c
chcp 65001 & echo|set/p=%P|clip
C:\WINDOWS\system32\cmd.exe
CopySrcPath-WithTrailingBackSlash-ToClipboard
1
-1
Find me: CopySrcPathWithBSToClip CopySrcPathWithTrailingBackSlashToClipboard Copy Source Path With Trailing BackSlash To Clipboard
- Zaytsev Artem
- Junior Member
- Posts: 2
- Joined: 2015-01-28, 23:12 UTC
Re: "cm_CopySrcPathToClip" ending with backslash
Oops, i made a rude mistake, which wasn't noticed till today. If the path contains spaces, then the code doesn't work good.
As it's %P, not %N, of course we got to use quotes. Here's the corrected string:
Code: Select all
param=chcp 65001 & echo|set/p="%P"|clip