@echo off:aping -n 3 127.0.0.1if exist ???.mpg shutdown -s -t 00if not exist ???.mpg goto a???为你的文件名和路径,脚本原理如下设定一个延迟反复检测指定文件是否存在,存在关机,不存在则重新检查。