i have a *.txt file with several lines as follow
test1
A1 1 2 3 4
b2.13
C3.14
D63829
A0 B1.1 C1.2 Z1.3
H1 Z0 K2.3
A0 B1.2 C1.2 Z1.1
A0 B1.3 C1.4 Z1.5
......
i want to have a batch file, to open, read and find line "H1 Z0 K2.3" and insert two new lines like
test1
A1 1 2 3 4
b2.13
C3.14
D63829
A0 B1.1 C1.2 Z1.3
H1 Z0 K2.3
T20
T19
A0 B1.2 C1.2 Z1.1
A0 B1.3 C1.4 Z1.5
......
indeed, i wrote the following code, but it doesn't work!any help will be greatly appreciated
@ECHO OFF
::set SrcFolder=c:\test
::set DstFolder=C:\test1
set inputfile=C:\Users\old.txt
set outputfile=C:\Users\new.txt
for %%a in ("%inputFile%") do (
(for /f "usebackq delims=" %%h in ("%%a") do (
if "%%h" equ "H1 Z0 K2.3 " (
echo T20
echo T19
) else (
echo.%%h
)
))>"%outputfile%\%%~nxa"
)
ECHO.
ECHO Done!