问题
I have no idea at all how to make an "and if" statement for my batch file, and I hope I could get some help in here.
The line I'm trying to make:
if %a%==X/O and if %b%==X/O goto done
回答1:
Batch doesn't have support for and
s or or
s in if
logic. You can simulate an and
by nesting your conditions.
if %a%==X/O (
if %b%==X/O (
goto done
)
)
Similarly, you can simulate an or
by having two separate checks.
if %a%==X/O goto done
if %b%==X/O goto done
来源:https://stackoverflow.com/questions/33708207/batch-file-and-if-statement