so I have several vars stored in a text file in a batch file
(
set /p var1=
set /p var2=
set /p var3=
)<oi.txt
and they are an if statement.
if I were to run% var1%, it would execute the if statement, however, when I ran
for /l %%i in (1,1,3) do !var%%i!
(in setlocal enabledelayedexpansion) it launches if, however returns
`if` is not recognized as an internal or external command
`if` is not recognized as an internal or external command
`if` is not recognized as an internal or external command
Is this oversight of Microsoft? or maybe something that fixes another price error without having this option?
* edit this has nothing to do with the for command using! var% number%! with var1 having inside an if statement returns the same problem. (also, im 100% sure that the if statement inside var is correct, why not recognize it even if it was incorrect?)
source
share