Jump to content
Sign in to follow this  
shivan82

Search for text within a single log file

Recommended Posts

shivan82

How would I do this?

Share this post


Link to post
Share on other sites
shivan82

Could someone post a few lines of code as an example? Just a simple open X file and search for "Y" text.

Share this post


Link to post
Share on other sites
seandisanti

Could someone post a few lines of code as an example? Just a simple open X file and search for "Y" text.

it would be something like this:

$Contents = FileRead("c:\log.txt")
$location = StringInStr($contents,"Y")
If $location Then MsgBox(0,"Found","The search string is in the log")

Share this post


Link to post
Share on other sites
shivan82

Thanks!! :)

Share this post


Link to post
Share on other sites
seandisanti

Thanks!! :)

no problem, glad to help

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×