how to halt batch script execution for 5 seconds
@echo off
echo %time%
timeout 5 > NUL
echo %time%
how to halt batch script execution for 5 seconds
@echo off
echo %time%
timeout 5 > NUL
echo %time%
how to wait for seconds in batch file
Windows version: w10
Set LoopVar to whatever number you want.
Not exactly 1 second per loop but roughly 1 second.
This will count down till it hits zero
the below example waits for 3 seconds and counts down to 1 (not zero)
--------------------------------CODE---------------------------------
@echo off
set LoopVar=3
:Loop
PING localhost -n 2 >NUL
::/ optional line
echo %LoopVar%
set /a LoopVar=%LoopVar%-1
if not %LoopVar%==0 goto Loop
::/ optional line
pause
----------------------------------------------------------------------
below is simplifed delay without extra bits for pasting convence :)
----------------------------------------------------------------------
@echo off
set LoopVar=3
:Loop
PING localhost -n 2 >NUL
echo %LoopVar%
set /a LoopVar=%LoopVar%-1
if not %LoopVar%==0 goto Loop
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us