
隨機(jī)批處理的問題求助最后由 shuaige100 于 -7-17 13:11
- @echo off &setlocal enableDelayedExpansion
- for /f tokens=1* delims=: %%a in ('findstr/rvxc: * 1.txt^|findstr/n .')do set #%%a=%%b&set/a n+=1
- set/a c=%random%%%n+1
- call set c=%%#%c%%%
- echo %c%
- for /f tokens=1* delims=: %%d in ('findstr/rvxc: * 2.txt^|findstr/n .')do set g%%d=%%e&set/a n+=1
- set/a f=%random%%%n+1
- call set f=%%g%f%%%
- echo %f%
- for /f tokens=1* delims=: %%h in ('findstr/rvxc: * 3^|findstr/n .')do set i%%h=%%j&set/a n+=1
- set/a k=%random%%%n+1
- call set k=%%i%k%%%
- echo %k%
- pause >nul
nclick="copycode($('code0'));">復(fù)制代碼
第一個txt可以echo,2txt,很經(jīng)常ECHO 處于關(guān)閉狀態(tài),3.txt直接echo %j了,如何修改呢?