How to use random in BATCH script?
%RANDOM% gives you a random number between 0 and 32767.
%RANDOM%
Using an expression like SET /A test=%RANDOM% * 100 / 32768 + 1, you can change the range to anything you like (here the range is [1…100] instead of [0…32767]).
SET /A test=%RANDOM% * 100 / 32768 + 1
1.4m articles
1.4m replys
5 comments
57.0k users