I have this bat file to just kill and start the file, but I need a delay.
TASKKILL /F /IM "file.exe"
(what is the code to delay 1 minute before executing the code below?)
start /d "path" file.exe
Can you please help me? Thanks
I have this bat file to just kill and start the file, but I need a delay.
TASKKILL /F /IM "file.exe"
(what is the code to delay 1 minute before executing the code below?)
start /d "path" file.exe
Can you please help me? Thanks
You can use ping
as @Krister suggested
ping 127.0.0.1 -n 60
of if you are using Vista and above you can use the much easier timeout
timeout /t 60
I have used the ping
command to achive this, you could ping an invalid host and set the timeout for the command to your desired delay.
@echo off
ping 1.2.3.4 -n 1 -w 60000 >NUL
# this command will be run after 60000ms
echo 'running';
pause