APPENDTABS issue

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

APPENDTABS issue

Post by *frenky »

TC is installed in c:\totalcmd.
When APPENDTABS is called with
C:\totalcmd\saved\tabs\saved.tab parameter, all is OK, but when parameter is presented as:
%COMMANDER_PATH%\saved\tabs\saved.tab

Tabs are not appended, nothing happens in fact.

If I call:

Code: Select all

cmd /K echo -%COMMANDER_PATH%-
Output is:

Code: Select all

-C:\totalcmd-
Ambiguity succeeds where honesty dares not venture.
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hi, frenky.

Call it a bug or a missing feature:
If your parameter uses an environment variable, please, put the parameter behind the command in the command field. Ignore the parameter field in this case:
Command: APPENDTABS %COMMANDER_PATH%\saved\tabs\saved.tab
The parameter field will only accept and evaluate the special T.C. internal variables which you can find by pressing the <F1> key inside the parameter field. (Dialogbox: Configure - Change Buttonbar)

Kind regards,
Karl
User avatar
frenky
Senior Member
Senior Member
Posts: 250
Joined: 2005-07-30, 19:36 UTC

Post by *frenky »

Thanks for hint.
IMHO inconsistent behaviour with the rest of the TC "way", but as I can use the variable again I'm fine with this as well.
Ambiguity succeeds where honesty dares not venture.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

It is odd that you can't resolve environment variables in the Parameters field even with:
Command: cmd.exe /k ECHO
Parameters: %$WINDIR% + %$COMMANDER_PATH%
This works though:
Command: cmd.exe /k ECHO
Parameters: %%WINDIR%% + %%COMMANDER_PATH%%
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, Balderstrom.

Hiding away the environment variable in the parameter field from T.C. by doubling the ampersand may work if the command can expand the environment variable like cmd.exe obviously can. (It certainly can.)

Yet,
command: APPENDTABS
parameter: %%COMMANDER_PATH%%\saved\tabs\saved.tab
will not work, whereas
command: APPENDTABS %COMMANDER_PATH%\saved\tabs\saved.tab
parameter:
will.

Kind regards,
Karl
Post Reply