Do you have some slick tips and tricks to share with the rest of the Thwack community? If so, you’re in the right place. The Content Sharing Zone is designed for you to share and explore resources that can make managing your systems and network easier than ever. Here you’ll find all kinds of cool tools, like custom Orion reports and alerts you can leverage in your environment, custom scripts for Cirrus and ipMonitor, and even some useful device configurations. Go ahead and start sharing and exploring today!
The FileModified script allows you to watch a file to make sure it has not changed since the last time it was monitored. The script compares both the size of the file and the last-modified date to a state file that is generated as a baseline. The file size in bytes is returned as a statistic, allowing you to set thresholds and alerts on the file size.
This script requires temporary storage space to store the state file. To reset the status of the component after a file modification has been detected, you must manually delete the .state file. Deleting the .state file allows the script to generate a new baseline for future file comparisons.
Arguments
filePath stateFilePath
filePath
The local path or Universal Naming Convention (UNC) path to the file.
stateFilePath
The local path or UNC path to a folder for storing the state file. The state file has a .state file extension.
Example
These arguments monitor the file C:\temp\test.txt on the localhost, and uses the C:\temp folder of the localhost for storing the state file. The paths are in UNC syntax.