|I want to create a batch file which will essentially find a string in a text file, via Findstr for example and also print the line number where the result occurs. Then from the line number result, copy the previous 2 lines of text. |
Findstr /N 35=order24 log01.txt
*** Then with the result of the line number I want to copy the 2 line before.
For example say the result I get is
 lofile sfe 37=order24
I want to copy lines 999, 1000, and 1001.
Is this possible? I hope I've given enough information. I'm using XP.