@echo off&setlocal enabledelayedexpansion for /f "tokens=1* delims=|" %%a in (1.txt) do set /a n+=1,.%%a+=1&set "_!n!=%%a|%%b" (for /l %%a in (1,1,%n%) do ( for /f "tokens=1* delims=|" %%b in ("!_%%a!") do if !.%%b! leq 5 echo,%%b^|%%c ))>2.txt start 2.txt |
|