本帖最后由 flashercs 于 2018-12-12 13:48 编辑
- @echo off&setlocal enabledelayedexpansion
- set m=1000
- set "tmpFile=%temp%\$%random%.tmp"
- for /f "delims=" %%i in (all.txt) do set /a n+=1&set #!n!=%%i
- for /f "delims=" %%i in ('dir /b /a-d *.txt ^| findstr /ivx "all\.txt"') do (
- copy /y nul "%tmpFile%"
- (for /l %%a in (1 1 10) do (
- set /a n=!random!%%m+1
- for %%b in (!n!) do echo !#%%b!
- ))>>"%tmpFile%"
- copy /y /b "%tmpFile%"+"%%i" "%tmpFile%"
- copy /y "%tmpFile%" "%%i"
- )
- del /f /q "%tmpFile%"
- pause
复制代码
|