@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (t.txt) do (
set /a n+=1
if !n!==3 (
for /f "tokens=1-5 delims==|\-" %%a in ("%%i") do (
set "var=%%b"
call,set var=%%var:.= %%
call:sub %%var%%
call,set var="%%a=%%var%%|%%c-%%var%%\%%e"
echo !var:"=!
)
) else (
echo/%%i
)
)
pause>nul
:sub
set /a add=%4+1
call,set var=%1.%2.%3.%%add%%
goto:eof
用^| 和 ^\ 转义一下