Batch script to replace lines of text


Can anyone help please?

I would like to create a batch file which replaces not just one word or line in a file, but multiple lines, replacing the removed lines with some specified text. For example, let's just say the lines that appear immediately below has the following entry:

"Hello this is a very complex scenario but I (Line 1)
believe with MS DOS, there is always a way (Line 2)
round the problem. (Line 3)
(Line 4)
Any help on this would be greatly appreciated. (Line 5)
Happy New Year to all forum members." (Line 6)

I now need to replace Line 2, 3 and 4 with my some other text. It is worth pointing out my real-life scenario has a far greater number of lines to be replaced. Can this be down through a batch file?

Thank you.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!