sleep doesnt work, in XP anyway
I use XP Pro and sleep works very well.
@echo off
set /a c=0
:here
echo Sleep 3 seconds and repeat
echo when count is 10 quit
echo count = %c%
C:\batextra\sleep.exe 3
set /a c+=1
if %c% EQU 10 exit /b
goto here
OutPut:C:\batextra> reploop.bat
Sleep 3 seconds and repeat
when count is 10 quit
count = 0
Sleep 3 seconds and repeat
when count is 10 quit
count = 1
Sleep 3 seconds and repeat
when count is 10 quit
count = 2
Sleep 3 seconds and repeat
when count is 10 quit
count = 3
Sleep 3 seconds and repeat
when count is 10 quit
count = 4
Sleep 3 seconds and repeat
when count is 10 quit
count = 5
Sleep 3 seconds and repeat
when count is 10 quit
count = 6
Sleep 3 seconds and repeat
when count is 10 quit
count = 7
Sleep 3 seconds and repeat
when count is 10 quit
count = 8
Sleep 3 seconds and repeat
when count is 10 quit
count = 9
C:\batextra>