I am trying to make a program that makes a series of random letters and numbers, upper-case and lower case. Is there a way that I can make this possible for my code?
@echo off
title random password gen
:Start
cls && set choice=0
echo (type 0 to exit)
echo.
echo 1 Random Password
echo 5 Random Passwords
echo 10 Random Passwords
set /p input= quantity:
if %input%==0 exit
if %input%==1 set /a choice=%choice%+1 && goto a
if %input%==2 goto set /a choice=%choice%+5 && goto a
if %input%==3 goto set /a choice=%choice%+10 && goto a
goto start
:a
cls
if %choice%==1 echo your password is %random%
if %choice%==5 echo your 5 passwords are %random%, %random%, %random%, %random%, %random%.
if %choice%==10 echo your 10 passwords are %random%, %random%, %random%, %random%, %random%,%random%, %random%, %random%, %random%, %random%.
pause
echo press any key to continue to menu... && pause nul> && goto menu
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…