@ECHO OFF :: Check if a timeout period is specified IF "%1"=="" GOTO Syntax :: Filter out slashes, they make the IF command crash ECHO.%1 | FIND "/" >NUL IF NOT ERRORLEVEL 1 GOTO Syntax :: Check for a non-existent IP address :: Note: this causes a small extra delay! IF "%NonExist%"=="" SET NonExist=10.255.255.254 PING %NonExist% -n 1 -w 100 | FIND "TTL=" >NUL IF ERRORLEVEL 1 GOTO Delay SET NonExist=1.1.1.1 PING %NonExist% -n 1 -w 100 | FIND "TTL=" >NUL IF NOT ERRORLEVEL 1 GOTO NoNonExist :Delay :: Use PING time-outs to create the delay PING %NonExist% -n 1 -w %1000 >NUL :: Show online help on errors IF ERRORLEVEL 1 GOTO Syntax :: Done GOTO End :NoNonExist ECHO. ECHO This batch file needs an invalid IP address to function ECHO correctly. ECHO Please specify an invalid IP address in an environment ECHO variable named NonExist and run this batch file again. :Syntax ECHO. ECHO PMSlpW9x.bat ECHO Poor Man's SLEEP utility, Version 2.10 for Windows 95 / 98 ECHO Wait for a specified number of seconds. ECHO. ECHO Written by Rob van der Woude ECHO http://www.robvanderwoude.com ECHO Corrected and improved by Todd Renzema and Greg Hassler ECHO. ECHO Usage: CALL PMSLPW9X nn ECHO. ECHO Where: nn is the number of seconds to wait ECHO. ECHO Example: CALL PMSLPW9X 10 ECHO will wait for 10 seconds ECHO. ECHO Note: Due to "overhead" the actual delay may ECHO prove to be up to a second longer :End