ok, so im trying to make a batch file that creates a serial number like this: x-x-x-x-x only this time I replaced each "x" with %random%.. so my only problem is, I want each random number to be 4 digits not 5, anyone has any idea how can I make it generate such a number? heres my source code:
@echo off
goto a
:b
echo it's a 5 digits number!
:a
set "x=%random%-%random%-%random%-%random%-%random%"
if %random% gtr 9999 goto b
echo it worked
echo %x%
pause
thanks for any help in advanced...
Aucun commentaire:
Enregistrer un commentaire