正好今天用到Mark一下

@echo off
set /p before=请输入前面的字符
set /p after=请输入后面的字符
for /f “delims=” %%i in (1.txt) do (
if “%%i”==”” (
echo.>>2.txt
) else (
echo %before%%%i%after%>>2.txt
)
)
ren 2.txt 1.txt