[11.51 RC3] %COMMANDER_PATH% is resolved incorrectly

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: petermad, Stefan2, white, Hacker

Post Reply
ThomasCommander
Junior Member
Junior Member
Posts: 6
Joined: 2023-12-01, 18:39 UTC

[11.51 RC3] %COMMANDER_PATH% is resolved incorrectly

Post by *ThomasCommander »

Config 1

[em_set_TastBefehle]
Cmd=cm_List
Param=%COMMANDER_PATH%\Config\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf

Parameter result >> c:\$Recycle.BinOMMANDER_PATHConfig\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf

------------------------------------------

Config 2

[em_set_TastBefehle]
Cmd=cm_List
Param=\Config\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf

Parameter result >> \Config\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf

------------------------------------------

PS: using "SumatraPDF Plugin"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50105
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.51 RC3] %COMMANDER_PATH% is resolved incorrectly

Post by *ghisler(Author) »

Not a bug. Environment variables only work in the "command" field, not in the "parameters" field. The parameters field uses placeholders like %P or %N instead. %C is the same as %C1, which is replaced by the path+name of the first selected file (or file under the cursor).

To use an environment variable in the parameters field, use the syntax %|variable name| instead. The correct parameter would therefore be:
Param=%|COMMANDER_PATH|\Config\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf
Author of Total Commander
https://www.ghisler.com
ThomasCommander
Junior Member
Junior Member
Posts: 6
Joined: 2023-12-01, 18:39 UTC

Re: [11.51 RC3] %COMMANDER_PATH% is resolved incorrectly

Post by *ThomasCommander »

:)) lol

Error 40.

Thx
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50105
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.51 RC3] %COMMANDER_PATH% is resolved incorrectly

Post by *ghisler(Author) »

If it contains spaces, surround it with double quotes. Double quotes from ini files get removed, so we need to duplicate them.

Param=""%|COMMANDER_PATH|\Config\Tastaturbelegung\TotalCommander_Tastaturbelegung.pdf""

Moderator message from: ghisler(Author) » 2025-02-03, 10:01 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply