@echo off
set "strOne=L""
set "strTwo=","
for /f "tokens=*" %%i in (data.txt) do (
>>testOne.txt echo %strOne%%%i%strTwo%
)
pause
其中strOne为行首内容,strTwo为行尾内容。编译成批处理,源文件为data.txt,目标文件为testOne.txt
@echo off
set "strOne=L""
set "strTwo=","
for /f "tokens=*" %%i in (data.txt) do (
>>testOne.txt echo %strOne%%%i%strTwo%
)
pause
其中strOne为行首内容,strTwo为行尾内容。编译成批处理,源文件为data.txt,目标文件为testOne.txt