运行提示:复制代码
- REM --------------------------------------------------------------------------------------
- REM 检查必要文件
- REM --------------------------------------------------------------------------------------
- :check
- for %%i in (dism.exe oscdimg.exe imagex.exe xcopy.exe) do (
- %%i /? >nul
- if errorlevel 9009 (
- @echo 找不到%%i文件,请确保%%i位于本程序同一目录或系统可找到的目录中!
- pause >nul
- goto check
- )
- else (@echo 找到%%i文件!)
- )
- @echo 检查完毕!
复制代码
- if errorlevel 9009 (
- @echo 找不到%%i文件,请确保%%i位于本程序同一目录或系统可找到的目录中!
- pause >nul
- goto check
- ) else (
- @echo 找到%%i文件!)
- )
The ELSE clause must occur on the same line as the command after the IF. For example: IF EXIST filename. ( del filename. ) ELSE ( echo filename. missing. ) |
欢迎光临 批处理之家 (http://bathome.net./) | Powered by Discuz! 7.2 |