File Count Script
This SAM template uses a predefined SAM component monitor, File Count Monitor, to check the number of files in a directory. Optionally, you can also count files in subdirectories. Files that do not match the file extension or file attribute type are ignored.
This monitor may fail if you attempt to count more than 20,000 files in a directory using the wildcard * filter extension. For an accurate count of files in large directories, consider using a Windows Script Monitor that runs the File Count script. A sample is included in the following default folder on the Orion server:
C:\Program Files (x86)\SolarWinds\Orion\APM\SampleScriptMonitors\WindowsScripts.
Windows credentials that are valid on both the SAM and target server
The number of files in the directory, as specified by the path in the script argument