I have a logfile like this, and I need to extract filenames.

For File 1 of 209 -

Need to extract "01021997_0011708_ENDTREQ_111114.ica" from the line "Src info : D:\Test\ica\01021997_0011708_ENDTREQ_111114.ica" where it has "Save : Can't save file! Error code = BADI (Bad image file)"

File 2 of 209 -

Need to extract "01291997_0011708_APPPICTP_114307.ic" from the line "Src info : D:\Test\ica\01291997_0011708_APPPICTP_114307.ica" where it has "Can't load from file, rc = UNSF (Unsupported feature)"

Same way there is an error in File 4 but File 3 is just fine as there is no error.

Thanks in advance for your time and inputs.

=====================================================================

File 1 of 209

RAM free    :    2048.0 of    2048.0 Mb
Virtual free:    1672.7 of    2047.9 Mb
Target free disk space :  187218.9 of  953740.0 Mb
Temp free disk space   :   34794.8 of  241128.0 Mb

Src info : D:\Test\ica\01021997_0011708_ENDTREQ_111114.ica
ioca, 1696x2200px, 1bpp, 6 page(s), 200.000000x200.000000 dpi, 235172 bytes
Load page 1 :  ok

Save :  ok
Load page 2 :  ok

Save :  ok
Load page 3 :  ok

Save : Can't save file! Error code = BADI (Bad image file)
Load page 4 :  ok

Save : Can't save file! Error code = BADI (Bad image file)
Load page 5 :  ok

Save : Can't save file! Error code = BADI (Bad image file)
Load page 6 :  ok

Save : Can't save file! Error code = BADI (Bad image file)

Dest info : D:\Test\converted\01021997_0011708_ENDTREQ_111114.pdf
pdf, 0x0px, 0bpp, 2 page(s), 341604 bytes

=====================================================================

File 2 of 209

RAM free    :    2048.0 of    2048.0 Mb
Virtual free:    1672.7 of    2047.9 Mb
Target free disk space :  187216.6 of  953740.0 Mb
Temp free disk space   :   34810.8 of  241128.0 Mb

Src info : D:\Test\ica\01291997_0011708_APPPICTP_114307.ica
ioca, 432x524px, 24bpp, 1 page(s), 125.000000x125.000000 dpi, 21294 bytes
Load all pages : 
Can't load from file, rc = UNSF (Unsupported feature)

Image loading failed
Can't load file!

=====================================================================

File 3 of 209

RAM free    :    2048.0 of    2048.0 Mb
Virtual free:    1672.7 of    2047.9 Mb
Target free disk space :  187216.6 of  953740.0 Mb
Temp free disk space   :   34810.8 of  241128.0 Mb

Src info : D:\Test\ica\01291997_0011708_ENDTREQ_114249.ica
ioca, 1696x2200px, 1bpp, 1 page(s), 200.000000x200.000000 dpi, 40167 bytes
Load all pages :  ok

Save :  ok

Dest info : D:\Test\converted\01291997_0011708_ENDTREQ_114249.pdf
pdf, 0x0px, 0bpp, 1 page(s), 121518 bytes

=====================================================================

File 4 of 209

RAM free    :    2048.0 of    2048.0 Mb
Virtual free:    1678.9 of    2047.9 Mb
Target free disk space :  187213.7 of  953740.0 Mb
Temp free disk space   :   34804.0 of  241128.0 Mb

Src info : D:\Test\ica\02232000_0011708_APPPICTP_135608.ica
ioca, 456x536px, 24bpp, 1 page(s), 125.000000x125.000000 dpi, 21849 bytes
Load all pages : 
Can't load from file, rc = UNSF (Unsupported feature)

Image loading failed
Can't load file!

=====================================================================
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.