[solved} %P%N doesn't always work for some internal commands

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

[solved} %P%N doesn't always work for some internal commands

Post by *petermad »

Using %P%N as parameters (in button, start menu or user command) doesn't work if there are spaces in the path or file name for the commands: OPENTABS, OPENTABSL, OPENTABSR, APPENDTABS, APPENDTABSL, APPENDTABSR and OPENBAR.

Changing %P%N to %p%n or %P%n solves the problem for spaces both in path and file name, while %p%N only solves it for spaces in path name.

The disadvantage of using %p%n is that when used with OPENBAR a new .br2 file with the 8.3 filename is created.

%P%N works fine with other long filename names - it seems only to be names / paths with spaces that doesn't work.
Last edited by petermad on 2021-05-30, 17:32 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This happens because %P%N is automatically surrounded by double quotes when the name contains spaces - and most Windows functions fail when the path is surrounded by double quotes.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8704
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I think it is not so hard to remove quotes from all parameters accepted by internal commands:)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sure, that's why I moved it to "confirmed bugs"...
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14914
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Fixed in TC 7.55pb3 :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply