电脑循环重启五次的bat命令,如何写啊?

2025-06-22 03:40:46
推荐回答(1个)
回答1:

非常简单,复制以下代码到记事本:
@echo off
if not exist c:\1.txt echo. >c:\1.txt
& goto err1
if not exist c:\2.txt echo. >c:\2.txt & goto err1

if not exist c:\3.txt echo. >c:\3.txt & goto err1
if not exist
c:\4.txt echo. >c:\4.txt & goto err1
if not exist c:\5.txt echo.
>c:\5.txt & goto err1
goto err2
:err1
shutdown -s -t 0

:err2

以上的意思我就不多说了,如果你想让对方连续重新启动,那就无限的增加下去,

如在“if not exist
c:\5.txt echo. >c:\5.txt & goto err1”后面增加“if not exist c:\5.txt echo.
>c:\6.txt & goto err1”

复制完以后,保存到记事本,把记事本文件更改为
.bat后缀的文件。

这样就完成制作了。