(view source code of random.bat as plain text)
@ECHO OFF
ECHO.
IF NOT [%1]==[] GOTO Syntax
VER | FIND "Windows 2000" >NUL
IF NOT ERRORLEVEL 1 GOTO Start
VER | FIND "Windows XP" >NUL
IF NOT ERRORLEVEL 1 GOTO Start
GOTO Syntax
:Start
SET NAT=%Random%
IF [%NAT%]==[] GOTO Syntax
IF %NAT% GTR 9 SET /A NAT = 1%NAT:~-2,2% - 100
SET NAT
GOTO End
:Syntax
ECHO Random.bat, Version 2.00 for Windows 2000 / XP
ECHO Generate a semi-random number between 0 and 99.
ECHO.
ECHO Written by Nathan Rooke
ECHO Modified by Rob van der Woude
ECHO.
ECHO Usage: RANDOM
:End
page last modified: 2024-04-16; loaded in 0.0074 seconds