batch file question

josphII

Banned
Nov 24, 2001
1,490
0
0
in a nutshell i would like to create a batch file that selects from a given set of files at random, how would i do this?

or

selects a random number from 1 to x, then adds that random number to the begining of a variable whos value is a string, such as the word "test"

for example the batch file would randomly select the number 50 and create a variable whos value is "50test"

i would greatly appreciate any help
 

josphII

Banned
Nov 24, 2001
1,490
0
0
ok ive just answered my own question but still need a little help.....

set a=%random%
set b=test
set c=%a%%b%

however the %random% call returns a random number from 1 to like 32000, i want to limit the max. anybody know how?