0
我有这个bat文件只是杀死和启动文件,但我需要一个延迟。延迟代码来启动exe文件
TASKKILL /F /IM "file.exe"
(what is the code to delay 1 minute before executing the code below?)
start /d "path" file.exe
你能帮我吗?谢谢
我有这个bat文件只是杀死和启动文件,但我需要一个延迟。延迟代码来启动exe文件
TASKKILL /F /IM "file.exe"
(what is the code to delay 1 minute before executing the code below?)
start /d "path" file.exe
你能帮我吗?谢谢
我已经使用ping
命令来实现这一点,你可以ping一个无效的主机,并将命令的超时设置为所需的延迟。
@echo off
ping 1.2.3.4 -n 1 -w 60000 >NUL
# this command will be run after 60000ms
echo 'running';
pause
您可以使用ping
作为@Krister建议
ping 127.0.0.1 -n 60
如果你正在使用Vista的
以上可以使用更容易timeout
timeout /t 60
http://stackoverflow.com /问题/ 1672338 /如何对睡眠为-5秒合windowss-命令提示-或待办事项 –