I need to set two environment variables: test_input and test_output
set test_input=..\..\testfiles\test0.txt
set test_output=..\..\temptest\out.%test_input:..\..\testfiles\=%
This works very well under command prompt and in a batch file only with these two lines. But when I
put it into one of my batch file, like
if %test_exefile%==repack (
set test_input=%1 :: this line works fine and %1 will set to .\..\testfiles\test0.txt
set test_output="..\..\temptest\out.%test_input:..\..\testfiles\=%
...
)
The first set line works fine. But the second variable (test_output) will set to ..\..\temptest\out...\..\testfiles\=
I also tried to replace the second set with the
set test_output="..\..\temptest\out.%test_input:~16%"
Use this, I will set test_output="..\..\temptest\out.~16", but it works under command prompt.
Anyone can give any kind of helpful thoughts? Thanks in advance!
