The sample scripts are not supported under any SolarWinds support program or service. The sample scripts are provided AS IS without warranty of any kind, and SolarWinds expressly disclaims all implied warranties including, warranties of merchantability or of fitness for a particular purpose. In no event shall SolarWinds or any other party be liable for damages arising out of the use of or inability to use the sample scripts.

Find Files Over a Certain Size In A Specific Folder

Last Modified Date: 9/23/2019 2:04 PM


This automation policy looks for files in a selected folder, based on a file mask, and will return all files that are over a certain size.

The policy uses 3 input parameters : the input folder (it will look in subfolders too), the file mask (*.*, *.log, etc), and the file size threshold (files over that size will be picked)

This can be easily converted into a custom service for N-Central by the user, and a second script-check already exists based on this on the cookbook. 



Automation Policy


Windows File System

Target OS

Windows 8/8.1;Windows 10;Windows Server 2012 / 2012R2;Windows Server 2016;Windows Server 2019

Compatible with N-Central


N-Central minimum version


Compatible with RMM



For details on how to use this, please go to the MSP Institute and look at automation courses. 
To get to the MSP Institute, go to the success center ( and once logged in, go to training or MSP Institute. from there, go to the course library and search for automation courses


the policy outputs 2 parameters. it outputs the files found along with their size (in a list), and it also outputs a file count of how many files were found in the folder


file size, ost, search, amp 201909

Did this article help you?

Rate this article


Recommended Content