@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%