描述不太严谨,看看是这样否:- @echo off
- set var=0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
- setlocal enabledelayedexpansion
- for /l %%i in (6,1,16) do set _!random!=%%i
- for /f "tokens=2 delims==" %%i in ('set _') do set n=%%i
- for /l %%i in (1,1,%n%) do (
- set /a m=!random!%%62
- for %%j in (!m!) do set str=!str!!var:~%%j,1!
- )
- echo,%str%
- pause
复制代码
|