隨機抽行的批處理文本指定路徑就不可以怎么改D:zonglian.txt這個文本指定路徑就不行?怎么改nclick="copycode($('code0'));">復制代碼
- @echo off
- setlocal enabledelayedexpansion
- set fn=D:zonglian.txt
- for /f tokens=2 delims=: %%i in ('find /c /v .* %fn%') do set/a n=%%i
- for /l %%i in (1,1,5) do (
- set /a a=!random! %% %n% +1
- set r=!r!,!a!)
- set n=
- (for /f tokens=* %%i in ('type %fn%') do (
- set /a n+=1
- for %%j in (%r%) doif %%j==!n! echo %%i))>D:zlian.txt