Parse File For Specific Word

I want to create a relevance script that reads a file and determine if there is the word “failed” in the file. Any suggestion?

Q: exists lines whose (it as lowercase contains "failed") of files "C:\TEMP\yourfile.txt"

2 Likes

exists file “path\file.ext” whose (content of it contains “failed”)

if the file is currently in use, try using one of the locked content inspectors.

2 Likes

how about if i want the task to be relevent if it doesnt contain the word “failed”?

Q: exists files "C:\TEMP\yourfile.txt" whose (content of it as lowercase does not contain "failed")

Q: exists lines whose (it as lowercase does not contain "failed") of files "C:\TEMP\yourfile.txt"

The “content” inspector suggested by @JonL is slightly quicker than “lines of” though I’d be cautious if the file to inspect is one that grows in size as that would be evaluated every cycle and could impact client performance.

1 Like