@echo off set /a m=2 (for /f "delims=" %%a in (a.txt) do ( set /a "n+=1,1/(n%%m)" 2>nul||echo %%a ))>b.txt pause复制代码