how to read the 3rd line after the string?

March 10, 2011 at 06:39:38
Specs: Windows Vista
It is possible in Batch file to find a string in a text file and if found, read the 3rd line after of that string?

See More: how to read the 3rd line after the string?

Report •

#1
March 10, 2011 at 07:26:13
Answer is yes, but with out examples of what you are looking at and what you are looking for we can not help any further. Please provide a sample of the file you are searching through and what it is you are looking for.

Report •

#2
March 11, 2011 at 05:53:53
Thanks for the reply. Here's a simple example: (myfile.txt) contains:
I can assure you that I answer all e-mails.So to those that think I am snubbing you, it's because your e-mails have been rejected due to html,
your return address is invalid, a form is required,
or the e-mail is blank or unreadable.

I want to find the string "answer" and then read or echo the line "your return is invalid, a form is required" and move it to >>newfile.txt.


Report •
Related Solutions


Ask Question