判断文件是否存在
if not EXIST "文件绝对路径" goto exit
存在……
:exit
不存在

执行一个应用程序
start 应用程序名称
start notepad.ext

执行另一个批处理
call a.bat

查找进程是否存在
tasklist /nh|find /i "QQa.exe"
if ERRORLEVEL 1 (echo qqa.exe不存在) else (echo qqa.exe存在)

tasklist | findstr /i botserver.exe

IF ERRORLEVEL 1 start /b botserver.exe

 

暂定 X 秒(非精确)
ping -n 2 -w 500 0.0.0.1>null

关闭进程
taskkill


posted on 2012-03-31 11:02 arrow8209 阅读(316) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


统计