LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Scanning a string from a file

I am trying to scan a string ("Exception") from a big log file and put it in to an array of characters. Is there any way I can scan the entire file and get that particular string (i.e. "Exception") out of the file using the Scanfile or any other function. I was unable to find a modifier in the Scanfile function that serves the purpose. Are there any suggestions?
 
Thank you in advance.
0 Kudos
Message 1 of 2
(3,093 Views)
One way to do this is to open the file and repeatedly call ReadLine() then FindPattern() (both from the CVI Formatting and I/O library).

See the attached file.

Message Edited by cdk52 on 08-04-2006 10:47 AM

0 Kudos
Message 2 of 2
(3,087 Views)