- @echo off&setlocal enabledelayedexpansion
- for /l %%i in (1 1 100) do (
- echo cs%%>>1.txt
- )
- :loop
- set /a var=%random%%%100+1
- findstr "%var%" 1.txt>>3.txt
- set /a n+=1
- if %n% lss 100 goto loop
- for /f "delims=" %%a in (3.txt) do (
- set /a m+=1
- set v!m!=%%a
- )
- for /f "delims=" %%i in (1.txt) do (
- set /a w+=1
- call echo %%i_%%v!w!%%>>2.txt
- )
- del 3.txt
- pause
复制代码
|