(view source code of random.bat as plain text)
@echo off
:: Random.bat, Version 1.00 for DOS
:: Random number generator
:: Written by Rob van der Woude
:: http://www.robvanderwoude.com
::
:: Create temporary helper batch file to
:: store hundredths of seconds in variable
echo set random=%%9>>enter.bat
:: Store current time in temporary batch file
ver | time | date | find "Current" | find ")" > temp.bat
:: Store current time's hundredths of seconds in variable
call temp.bat
:: Remove helper files
del temp.bat
del enter.bat
:: Display result
echo Random number: %random%
page last modified: 2024-04-16; loaded in 0.0040 seconds