本帖最后由 pcl_test 于 2015-4-26 11:21 编辑
- @echo off 2>nul 3>nul
- echo,正在处理……
- set /p str=<"测试.txt"
- (for /l %%i in (1 1 100)do call :loop %str%)>"结果.txt"
- echo,完成!
- pause & exit
- :loop
- setlocal enabledelayedexpansion
- set s=
- set /p t=<"%temp%\$"
- for /l %%a in (0 1 499)do (
- set "_!random!!str:~%%a,1!=!str:~%%a,1!"
- )
- for /f "tokens=1* delims==" %%b in ('set _')do set "s=!s!%%c"
- if "!t!" equ "!s:~,1!" goto loop
- >"%temp%\$" echo,!s:~-1!
- set /p=!s!<nul
- goto :eof
复制代码
|