Finding errors in a file
<p>I have a huge file whose contents are generated from running an executable over and over on different input files. The file's pattern is such: -file name followed by an arbitrary amount of text lines. I have to pick up the name of the file when there is an error in reading input data and I am not sure what the best way to do it is. Another problem is that the word error comes up every time anyway in a phrase (Final fitting error was (some numerical value)) which needs to be ignored.</p>

<pre><code>C:\temptest\blahblah1 
.. (arbitrary # of text lines)
Final fitting error : (some number) [I have to ignore this] 
C:\temptest\blahblah2
.. (arbitrary # of text lines)
Error could not read data !** [I have to pick up blahblah2 and copy the file to another directory, but just logging the name would suffice]
</code></pre>

<p>Thanks in advance ! </p>
