用于记录存档
@echo off & setlocal enabledelayedexpansion
:: 设置要生成的位数
set ws=4
:: 定义要生成字符的范围 0 -9a-zA-Z
set str=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
for /l %%a in (1,1,%ws%) do (
set /a num=!random!%%62
call set zf=%%str:~!num!,1%%
set pw=!pw!!zf!
ping 127.0.0.1 -n "1">nul
)
:: 输出随机生成的字符
echo,&echo !pw!
pause
微信扫描下方的二维码阅读本文