|
Summary Info... |
Description Designed initially to sift through IIS SMTP logs and archiver logs. Accepts a list of directories, a file name, or mask, and a list of search strings. Displays results, in terms of files and hit count. Writes same to log. Extracts matching lines to a second output file for examination. Configuration Configuration is done within the script body by modifying variable definitions in the Configuration section, beginning about line 50. Two files are defined by separately specifying their file name and path. Files are the script’s log file and the file containing the matching lines extracted from scanning. strSearchStringsG holds a comma-separated list of search text values to be searched for in target files. Individual strings are quoted, and then separated with commas. strSearchStringsG = "SampleString1","SampleString2" The target search folder(s) are specified in a comma-separated list of UNC or MS-DOS path names. If searching a local computer, MS-DOS paths execute much faster. All files in a target folder are searched based on the file’s modified timestamp. Dates can be specified as string literals in MM/DD/YYYY format, enclosed in quotes, or as functional references, such as the VbScript function Now() or using DateAdd(). The following examines files modified within the past 24 hours. dteStartDateG = DateAdd( "d", -1, Now ) dteEndDateG = Now() Execution The script can be run remotely, but executes much faster when run locally AND using MS-DOS path definitions. I will process a 1GB file in 2-3 minutes. Documentation Just this. Program archive includes sample files to search and typical output/log files. |