批处理if-else结构
判断结构的三种形式
if (not) errorlevel number command
if (not) string1=string2 command
if (not) exist filename command
注意:
ELSE 子句必须出现在同一行上的 IF 之后。例如:
IF EXIST filename. (
del filename.
) ELSE (
echo filename. missing.
)
if (not) errorlevel number command
if (not) string1=string2 command
if (not) exist filename command
注意:
ELSE 子句必须出现在同一行上的 IF 之后。例如:
IF EXIST filename. (
del filename.
) ELSE (
echo filename. missing.
)