Everyone uses random numbers at one point or another. So, I need some truly random numbers (not pseudo-random*) generated from the command prompt, I also want a system that generates letters in a code line the size of: set RANDOM=%random% %%2 +1
. And am I just trying to catch a non-existent butterfly? *pseudo-random is random that relies on outside info like time, batch's random generator is pseudo-random based on time, to test this open 2 new notepad .bat and name this file 1.bat
1.bat
start 2.bat
@echo off
cls
echo %random%
pause
2.bat
@echo off
cls
echo %random%
pause
What's happening?!? Well this is pseudo-random, as long as there is NO delay between the opening of the batch files, the batch file's numbers will be the same.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…