复制一个文件到 C:\Program Files\AA 查找文件,如果文件存在,文件夹就存在
@echo off
:loop
if exist "C:\Program Files\AA" ("C:\Program Files\AA.EXE" goto end)
if exist "C:\Program Files\BB" ("C:\Program Files\BB.EXE" goto end)
if exist "C:\Program Files\CC" ("C:\Program Files\CC.EXE" goto end)
if exist "C:\Program Files\DD" ("C:\Program Files\DD.EXE" goto end)
goto loop
:END
@echo off
:loop
if Exist "C:\Program Files\AA" (start "" "C:\Program Files\AA.EXE"&&exit)
if exist "C:\Program Files\BB" (start "" "C:\Program Files\BB.EXE"&&exit)
Ping -n 5 127.1>nul
Goto loop
pause