@echo off
cls
echo My own logic thinks an IF OR STATEMENT should work this way..
IF [1]==[1] echo good
IF [2]==[2] echo times
IF [1]==[2] echo this actually should not output
IF [1]==[1] OR [2]==[2] echo hello there (with or)
REM it told me 'or' is not recognized as an internal or external command, operable program or batch file.
我还没有弄清楚OR的语法问题
答案 0 :(得分:1)
批处理文件中没有OR
条件。您需要创建自己的条件:
IF [1]==[1] (
echo ok
) else (
if [2]==[2] (
echo ok
) else (
echo not ok
)
)