I have a file in .cmd
and I need it to generate random numbers with 10 algorithms. Such as 9006100001 and 1579970319 generated randomly.
I currently have the following function generating random numbers based on the system time.
setlocal
for /f "skip=8 tokens=2,3,4,5,6,7,8 delims=: " %%D in ('robocopy /l * \ \ /ns /nc /ndl /nfl /np /njh /XF * /XD *') do (
set "dow=%%D"
set "month=%%E"
set "day=%%F"
set "HH=%%G"
set "MM=%%H"
set "SS=%%I"
set "year=%%J"
)
From this function, I only use %SS%
, it's the closest I got to what I want so far, how could I create something similar to generate random numbers?
If possible, you could include a variation of this with alphanumeric characters *