@echo off
echo lol testing
pause
@echo off
Setlocal EnableDelayedExpansion
Set _RNDLength=8
Set _Alphanumeric=0123456789ABCDEF
Set _Str=%_Alphanumeric%987654321
:_LenLoop
IF NOT "%_Str:~18%"=="" SET _Str=%_Str:~9%& SET /A _Len+=9& GOTO :_LenLoop
SET _tmp=%_Str:~9,1%
SET /A _Len=_Len+_tmp
Set _count=0
SET _RndAlphaNum=
SET :_loop
:_loop
Set /a _count+=1
SET _RND=%Random%
Set /A _RND=_RND%%%_Len%
SET _RndAlphaNum=!_RndAlphaNum!!_Alphanumeric:~%_RND%,1!
If !_count! lss %_RNDLength% goto :_loop
Set _RNDZLength=4
SET _RNDZ=%Random%
SET _RndAlphaNumz=
:_loop
SET _RndAlphaNumz=!_RndAlphaNumz!!_Alphanumeric:~%_RNDZ%,1!
If !_count! lss %_RNDZLength% goto _loop
Set _RNDZALength=4
SET _RNDZA=%Random%
SET _RndAlphaNumez=!_RndAlphaNumez!!_Alphanumeric:~%_RNDZA%,1!
If !_count! lss %_RNDZALength% goto _loop
Set _RNDZADLength=4
SET _RNDZAD=%Random%
SET _RndAlphaNumedz=!_RndAlphaNumedz!!_Alphanumeric:~%_RNDZAD%,1!
If !_count! lss %_RNDZALength% goto _loop
Set _RNDZADALength=12
SET _RNDZADA=%Random%
SET _RndAlphaNumedaz=!_RndAlphaNumedaz!!_Alphanumeric:~%_RNDZADA%,1!
If !_count! lss %_RNDZALength% goto _loop
echo !_RndAlphaNum!-!_RndAlphaNumz!
pause
this is my code (i am aware that only 2 variables are in the echo) i am trying to make it print 8 - 4 - 4 - 12 tried a lot of things could anyone help? i copied the code from the 4-4 generator i made but i changed it from 4 to 8 been on this for like 2 hours trying to figure out whats wrong but have not found