Use this Knowledge Script to monitor files for changes to the current size, time stamp, and file attributes. This script raises an event if the size, time stamp, or attribute indicates the file has been modified.
Because this script checks the file properties rather than the file content, you can use this script with almost any file type.
Windows 2003 Server or later
The default interval for this script is Asynchronous. Regardless of the schedule you select, once you start the Knowledge Script, its job status appears as Running.
Set the following parameters as needed:
Parameter |
How to Set It |
---|---|
Event? |
Set to y to raise an event if the size, time stamp, or attribute indicates the file has been modified. The default is y. |
Collect data? |
Set to y to collect data about file modifications. The default is n. |
File path |
Provide a valid directory path and filename to specify the file (or files) you want to monitor. To monitor more than one file with a similar name or to monitor the creation and deletion of a file, use pattern‑matching characters to specify the filename. Use an asterisk (*) to match all characters and use a question mark (?) to match a single character. For example: C:\NetIQ Corporation\Temp\NetIQ Corporation_Debug\Tomc\m?.* matches the following files: mo.log mo.log.bkup ms.log ms.log.bkup To monitor all files in a directory (including new and deleted files), specify a directory path without a filename, for example, C:\temp. |
Check file size? |
Set to y to monitor the file’s current size. The default is y. |
Check file last write time? |
Set to y to monitor the file’s modification time stamp. The default is y. |
Check file attributes? |
Set to y to monitor the file’s attributes. The default is y. |
Event severity |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which file modifications are detected. The default is 8 (red event indicator). |