联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
if exist a.txt if exist b.txt set _filexist=true if "%_fileexist%"=="true" echo 文件都存在 if not "%_fileexist%"=="true" echo 文件不都存在 set _fileexist=
if not exist a.txt echo 不存在a.txt if not exist b.txt echo 不存在b.txt if exist a.txt if exist b.txt echo 文件都存在
if exist a.txt if exist b.txt goto filexist echo 文件不都存在 goto end :filexist echo 文件都存在 :end
if exist a.txt if exist b.txt (echo 文件都存在) else (echo 文件不都存在)