@echo off Setlocal Enabledelayedexpansion set "str=abcdefghijklmnopqrstuvwxyz1234567890+-_" for /l %%a in (1 1 200) do ( set /a "m=!random!%%39" call set "var1=%%var1%%%%str:~!m!,1%%" ) set "var=%var1%" for /l %%a in (1 1 20) do ( set "var2=!var:~,10!" set /p =!var2! <NUL set "var=!var:~10!" ) echo.&echo.&set "var=%var1%" for /l %%a in (1 1 20) do ( set "var2=!var:~,10!" echo.!var2! set "var=!var:~10!" ) pause>nul
shqf:
复制代码 代码如下:
@echo off set /p str=<1.txt set /p select=1.一行内分节显示 2.分行显示(请选择1-2): if %select% equ 2 goto fh
:fj set /p=%str:~,10% <nul if not "%str:~10%"=="" (set str=%str:~10%&goto fj) pause>nul&goto end
:fh echo %str:~,10% if not "%str:~10%"=="" (set str=%str:~10%&goto fh) pause>nul
terse:
复制代码 代码如下:
@echo off&Setlocal Enabledelayedexpansion set "var=abcdefghijklmnopqrstuvwxyz1234567890+-_" for /l %%i in (1 1 200) do set /a "m=!random!%%39"&call set str=!str!%%var:~!m!,1%% >1.txt echo %str% for /l %%i in (1 1 20) do set /p=!str:~,10! <nul&set "%%i=!str:~,10!"&set "str=!str:~10!" echo. for /l %%i in (1 1 20) do echo.!%%i! pause>nul
pusofalse:
复制代码 代码如下:
@echo off&setlocal enabledelayedexpansion set var=abcdefghijklmnopqrstuvwxyz0123456789+-_ for /l %%a in (1 1 200) do ( set/a n=!random!%%39 call,set a=!a!%%var:~!n!,1%% )