:: Here's a routine that generates a pseudo random number :: from 0 to 9. It does it by grabbing the hundredths :: of a second digit from the TIME command. It finishes :: by setting the environment variable RANDOM. :: ::----------------------------------------- @echo off echo.|time|find "Current" >cu##ent.bat echo set time=%%3> current.bat call cu##ent.bat del cu??ent.bat > nul echo = | choice /c=%time%= temp2.bat > temp1.bat echo shift>temp2.bat echo shift>>temp2.bat echo set RANDOM=%%9>>temp2.bat call temp1.bat del temp?.bat > nul ::----------------------------------------- :: http://www.calweb.com/~webspace