CODE: [Copy to clipboard]
@echo off
set "str1=msgId="
set "str3=^&satisficationStar=3^&serviceQuality=50^&professionLevel=50^&responseLevel=50^&servicePrice=50^&preVisitTime=1^&revist=1^&evaluation=%%E5%%8F%%91%%E5%%B8%%83"
if not exist c.txt (
>"c.txt" echo 1
)
set /p mark=<c.txt
set cur=1
setlocal enabledelayedexpansion
for /f "usebackq delims=:" %%a in ("a.txt") do (
set str2=%%a
if "%str%" equ "" (
>"c.txt" echo 1
)
if !cur! equ !mark! (
goto :merge
) else (
set /a cur+=1
)
)
endlocal
goto :eof
:merge
type nul>"d.txt"
for /f "tokens=1* delims=" %%a in ('findstr /v /i "msgId" "b.txt"') do (
>>"d.txt" echo %%a
)
>>"d.txt" echo.
>>"d.txt" echo %str1%%str2%%str3%
set /a mark+=1
>"c.txt" echo %mark%
move /y d.txt b.txt
[