FileSystem.GetFileByLine
Method | |
---|---|
Module | FileSystem |
Library | Core |
Action | Returns the lines of the given text file(s) matching the supplied regular expression pattern. |
Parameters | |
| |
Return values | A maximum of 50,000 lines is returned. For each line of each file matching the pattern found:
|
Example | Search the ConfigMgr WUAHandler log for any errors. FileSystem.GetFileByLine(FileName:"c:\\Windows\\CCM\\Logs\\WUAHandler.log", RegExp:"[eE]rror"); By default, the search is case sensitive. Here we are using RexExp to search for both Error and error. |
Platforms |
|
Notes | Do not use on a binary file - the returned A good site to help understand basic regular expressions is https://regexr.com/ |