Click to See Complete Forum and Search --> : random number/character generator


John Nelson
09-29-1998, 10:26 AM
I am looking for a random number generator so I can
pipe a random number or word into a batch file in
order to get a random computer name. Where can I
find one. I don`t have a fortran or C compiler so
the source code that`s out there doesn`t do me any
good. Could someone tell me where to find one that
will output a random number or word to a DOS environment
variable or just to the screen for piping...???

Thank you!!!!

John Nelson

Mark Soper
11-04-1998, 10:53 AM
On 9/29/98 10:26:09 AM, John Nelson wrote:
> I am looking for a random number generator so I can
pipe a random number

John,

You may want to use QBASIC ( comes with Windows ) and run something like:

` Create a file name with a random integer between 1 and 999
Randomize Timer
open "c: est"+str$(int(rnd*999)+1)+".ext" for output as #1
close #1

` note there will be a space between test & the number