Page 1 of 2

how to copy folder path without final backslash by "Ctrl+P"

Posted: 09 May 2020 15:32
by lambda
As the title,how to copy folder path without final backslash by "Ctrl+P"?
I set keyshorcut for copy "Item UNC Path",but There are backslashes at the end of the copyed path, What i needs to be configured?
Thanks your help very much!

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 15:20
by admin
You mean when the focus is in the folder tree? That's currently not possible.

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 15:34
by highend
Unassign CTRL+p, create a user defined command, use this script and assign CTRL+p to it...

Code: Select all

    if (<get FocusedControl> != "T") {
        if (<get CountSelected> > 0) { copytext <get SelectedItemsPathNames <crlf>>; }
        else { copytext <curpath>; }
    } else {
        copytext <curpath>;
    }

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:05
by admin
OTOH, AFAIK all paths in XY variables and other copy command (e.g. View | Tab | Copy Location Term) are returned without slash. This case here (Ctrl+P) in Tree seems to be the only exception. Shouldn't I just make it consistent and remove the slash here as well?

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:07
by highend
Then you should add something like
Configuration | General | Controls & More | Miscellaneous | Tree paths include trailing backslash

for those who are used to / depend on the old setting...

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:09
by Filehero
No. :)

This is a daily timesaver for me (within the "Save as ..." dialog of all programs I use)

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:10
by admin
Well, I try to avoid an additional setting. I think it would okay and logical to bind it to this setting:
Configuration | General | Controls & More | Miscellaneous | Address Bar paths include trailing backslash

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:13
by admin
I just saw that even the command "Copy Path" in "Configuration | General | Menus, Mouse, Usability | Context Menus | Folder Tree..." copies without slash although the context menu shows the Ctrl+P keyboard shortcut. So one could argue the current behavior of Copy Path is a bug. :bug:

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:14
by Filehero
admin wrote: ↑04 Oct 2020 17:10 Well, I try to avoid an additional setting. I think it would okay and logical to bind it to this setting:
Configuration | General | Controls & More | Miscellaneous | Address Bar paths include trailing backslash
Since it works this way in the list too, why not an even more generalization like File item paths ...

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:14
by admin
Filehero wrote: ↑04 Oct 2020 17:09 No. :)

This is a daily timesaver for me (within the "Save as ..." dialog of all programs I use)
They don't work without the slash?

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:18
by Filehero
admin wrote: ↑04 Oct 2020 17:14 They don't work without the slash?
I just copy the path of an selected folder (with backslash) and paste it in front of the file name -> no target folder navigation needed at all.

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:22
by admin
Filehero wrote: ↑04 Oct 2020 17:14
admin wrote: ↑04 Oct 2020 17:10 Well, I try to avoid an additional setting. I think it would okay and logical to bind it to this setting:
Configuration | General | Controls & More | Miscellaneous | Address Bar paths include trailing backslash
Since it works this way in the list too, why not an even more generalization like File item paths ...
Yes, maybe. Not sure about all the ramifications... :eh:

What is your setting of Address Bar paths include trailing backslash?

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:28
by Filehero
I'm on iOS right now - an OS that still tries to avoid to bother a user with simple things like files. At least, a keyboard simulation is there ...

Later when back at home.

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:29
by admin
Seeing this I'd say the current behavior is a bug:

Code: Select all

v19.50.0244 - 2019-01-26 14:52
...
     * Copying paths to clipboard: Now paths are copied without a trailing 
       backslash. Before, it was not always like that.
       Exception: According to some crazy de facto standard (Windows Explorer 
       does it like this) drive roots are returned with backslash ("C:\", not 
       "C:").
But I guess I will have to add a setting like "Copy paths to clipboard with a trailing slash"...

Re: how to copy folder path without final backslash by "Ctrl+P"

Posted: 04 Oct 2020 17:30
by Filehero
:tup: