Code: Select all
[em_test]
cmd=em_test_impl "%COMSPEC%"
param=%A1
[em_test_impl]
cmd=cmd.exe
param=/k echo.%A1:~1,-1\%A2
Code: Select all
TOTALCMD#BAR#DATA
em_test
123 456
C:\totalcmd\TOTALCMD.EXE,3
0
-1
Expectation:C:\WINDOWS\system32\cmd.exe" \123
I need quotes because the environment variable value can have has spaces and I can not use it without quotes:C:\WINDOWS\system32\cmd.exe\123
Code: Select all
[em_test]
cmd=em_test_impl %CommonProgramFiles%
param=%A1
[em_test_impl]
cmd=cmd.exe
param=/k echo.%A1\%A2
I know I can pass the environment variable in the "param" key as "%%COMSPEC%%", but it will leave the expansion to the "cmd.exe". I want to expand it by the Total Commander.C:\Program\Files\Common
Is there another way to use both variables at the same time?