将文件C:\Users\pactera\Desktop\Test\test.txt的内容插入到文件
C:\Users\pactera\Desktop\Test\test.ctl(指定从第5行插入)
生成一个新的文件C:\Users\pactera\Desktop\Test_test.ctl
@echo off
@setlocal enabledelayedexpansion
@set n=1
@for /f “delims=” %%i in (C:\Users\pactera\Desktop\Test\test.ctl) do (
@if “!n!”==“5” goto N
@echo %%i >>C:\Users\pactera\Desktop\Test_test.ctl
@set /a n=n+1
)
:N
@type C:\Users\pactera\Desktop\Test\test.txt>>C:\Users\pactera\Desktop\Test_test.ctl
@for /f “skip=3 delims=” %%j in (C:\Users\pactera\Desktop\Test\test.ctl) do @echo %%j >>C:\Users\pactera\Desktop\Test_test.ctl