@echo off setlocal EnableDelayedExpansion for /f "delims=" %%i in (3.txt) do ( set var=%%i set var=!var:第一节=第1节! set var=!var:第二节=第2节! set var=!var:第三节=第3节! echo !var!>>filename3.txt )
代替换文本:3.txt 替换后新文本:filename3.txt