Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

"IF" command in a variable does not expand redirection variable name

Jul
12
0
The script tcc_quirk.bat manages to create a file "%[CmdLog]" from the command %[Cmd] >& %[CmdLog] when the command (the Cmd variable) contains an IF statement. For example:
Code:
set Cmd=if not isdir \t\tcc mkdir \t\tcc
set CmdLog=\t\tcc\whatever.log
%[Cmd] >"%[CmdLog]"
.
The uploaded tcc_quirk.bat demonstrates the quirk (or my mistake ..).

Happens with TCC 17.00.58 x64 Windows 8.1 [Version 6.3.9600]
 

Attachments

  • tcc_quirk.bat
    909 bytes · Views: 331
Last edited:

Similar threads

Back
Top