afile.txt文件内容:
UserName1=
UserName2=
UserName3=
希望生成bfile.txt文件内容:
UserName1=
welcom you!
UserName2=
UserName3=
代码如下:- @echo off
- set /a n=0
- FOR /F "delims=" %%i in (afile.txt) do (
- echo %%i >> bfile.txt
- set /a n=%n%+1
- echo %n%
- if %n% equ 1 (
- echo welcom you! >> bfile.txt
- )
-
- )
复制代码 想在第二行加入字符串,但是 set /a n=%n%+1并没有累加计算,谁能解决下》? |