Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for random.bat

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

  1. @echo off
  2. :: Random.bat,  Version 1.00 for DOS
  3. :: Random number generator
  4. :: Written by Rob van der Woude
  5. :: http://www.robvanderwoude.com
  6. ::
  7. :: Create temporary helper batch file to
  8. :: store hundredths of seconds in variable
  9. echo set random=%%9>>enter.bat
  10. :: Store current time in temporary batch file
  11. ver | time | date | find "Current" | find ")" > temp.bat
  12. :: Store current time's hundredths of seconds in variable
  13. call temp.bat
  14. :: Remove helper files
  15. del temp.bat
  16. del enter.bat
  17. :: Display result
  18. echo Random number: %random%
  19.  

page last modified: 2024-04-16; loaded in 0.0161 seconds