我也要分
那里错了 原码都改没了- @echo off&Setlocal Enabledelayedexpansion
- set "str=abcdefghijklmnopqrstuvwxyz1234567890+-_"
- for /l %%i in (1 1 200) do set /a "m=!random!%%39" & call set /p=%%str:~!m!,1%%<nul>>1.txt
- set/p str=<1.txt
- for /l %%i in (1 1 20) do call set /p=%%str:~!n!,10%% <nul&call set "%%i=%%str:~!n!,10%%"&set/a n+=10
- echo.
- for /l %%i in (1 1 20) do echo.!%%i!
- pause>nul
复制代码 第一次上的码没了 不知道错在那里- @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
复制代码
[ 本帖最后由 terse 于 2008-8-12 14:49 编辑 ] |