
CODE: [Copy to clipboard]@echo off
if not exist count.txt >count.txt echo 1
echo.
echo 本批处理运行三次之后,将自动销毁
echo.
setlocal enabledelayedexpansion
for /f %%i in (count.txt) do (
echo 现在是第 %%i 次运行
set count=%%i
set /a count+=1
if !count! gtr 3 goto del_self
>count.txt echo !count!
)
echo.
pause
goto :eof
:del_self
echo.
echo 正在销毁自身...
ping -n 3 127.1>nul
del count.txt %0
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |