批处理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.
)
posted @ 2022-08-07 16:22  八爪spider  阅读(469)  评论(0编辑  收藏  举报