@echo off&setlocal enabledelayedexpansion for /f "tokens=1,4 delims=|" %%a in (a.txt) do ( set "str=%%a" set "verstr=%%b" set str=!str:*:=! echo !str! !verstr!>>b.txt ) start b.txt
回答2:
for /f "tokens=3,6 delims=| " %i in (a.txt) do @echo %i %j >>b.txt