Hi all
Got a small problem with parsing texts under XP/Vista/Win2k3.
I know how to find a string in a textfile using FOR or Find but then I only output just that line with text. I need to find a certain string in a text and then output the information in text 2 lines above.
For example:
[2008-01-26 00:27:19.214 'BaseLibs' 1852 warning] SSLVerifyIsEnabled: failed to read registry value. Assuming verification is disabled. LastError = 0
[2008-01-26 00:27:19.214 'BaseLibs' 1852 warning] SSLVerifyCertAgainstSystemStore: Certificate verification is disabled, so connection will proceed despite the error
Converting "x:\vcb-mount\SRV-AXWEB01-fullVM\scsi0-0-0-SRV-AXWEB01.vmdk" (compact file):
0%=====================50%=====================100%
***************[2008-01-26 00:29:13.198 'App' 1852 warning] SanMpAIOMgrRWv: Failed to complete any SCSI IO requests within 200ms.
**********************[2008-01-26 00:33:39.071 'blocklist' 5860 error] Could not renew disk lease. Aborting operation.
[2008-01-26 00:33:44.431 'BlockList' 1852 error]
*************
[2008-01-26 00:33:46.681 'BlockList' 1852 error] The managed object of type "vim.host.DiskManager.Lease" identified by the MoRef "session[6AFEAC02-61FF-4D73-92FD-A542DAE42800]FE1163EB-5D85-4280-A790-FDF5A1D0F0C1" could not be found.
This is from a logfile and i'd like to locate 'Failed to complete' and from there output the line saying 'Converting "x:\\vcb-mount\SRV-AXWEB01-fullVM\scsi0-0-0-SRV-AXWEB01.vmdk" (compact file):' to a new textfile to easier locate where problems occur. And yes, the information in the line that I want to output does change so I can't just find the same string and output it, woul'd have been too easy.
Is there anyone that could help me with a good solution for this?
/Thansk
Zymos