Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for wait.bat

(view source code of wait.bat as plain text)

  1. @ECHO OFF
  2. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  3. IF "%~1"=="" GOTO Syntax
  4. ECHO.
  5. ECHO Waiting %~1 seconds
  6. ECHO.
  7. CHOICE /C:AB /D:A /T:%1 > NUL
  8. IF ERRORLEVEL 255 (
  9. 	ECHO Invalid parameter
  10. 	GOTO Syntax
  11. )
  12. GOTO:EOF
  13.  
  14. :Syntax
  15. ECHO.
  16. ECHO WAIT for a specified number of seconds
  17. ECHO.
  18. ECHO Usage:  WAIT  n
  19. ECHO.
  20. ECHO Where:  n  =  the number of seconds to wait (1 to 99)
  21. ECHO.
  22. EXIT /B 1
  23.  

page last modified: 2024-02-26; loaded in 0.0083 seconds