本帖最后由 Lornan 于 2014-12-10 09:54 编辑
- @echo off
- if exist 1.txt (echo --We found the file and its contents is :
- type 1.txt) else (echo --Sorry that we can not find the file)
- echo Do you need to start a program that may help you open another file ?
- set LT=
- set /P %LT%=Press Y to start the program or N to exit.
- if "%LT%"=="Y" (
- START TEST2.BAT
- ) ELSE (
- EXIT
- )
- PAUSE
复制代码 就上面的做成cmd的批处理,执行后输入Y就直接退出了…………我的文件夹里有1.txt 和test2.bat这两个文件。
感觉是哪写错了……………… |