file a.txt
AS02032849
AS02037866
AS04444444
AS02040196
AS06666666
file c.txt
1111111111
I need to append the content of file c.txt
in a.txt
after the line 3
.
output of temp.txt
AS02032849
AS02037866
AS04444444
1111111111
AS02040196
AS06666666
script
@ECHO OFF
set /a counter=0
(
FOR /F "tokens=*" %%A IN (a.txt) DO (
set /a counter=%counter%+1
ECHO %%A
echo.%counter%
IF %counter% EQU 3 (
TYPE c.txt
)
)
) >temp.txt
pause