Notify when there is a new file in a folder

The PowerShell Data Provider in exMon can be used for various things. In this post I will create a test in exMon, using PowerShell to notify whenever there is a new file that matches a pattern in a folder.


1. Create a new Compare Query in exMon Administrator by right clicking the Tests folder

2. In the first query window, choose the PowerShell Data Provider and add the following PowerShell script:

$path = "C:\temp\Names*.txt"

$exMonResult =  Get-ChildItem $path | Select-Object -Property FullName,CreationTime | exMon-Out-DataTable

3. In the second query window, choose the Saved Comparative Data Provider and set it to autosave results during each execution.

4. Map the output columns as normal.

5. Make sure only “DS2 incl. DS1” is selected. That makes sure we are only notified of new files, not removed files.

6. Configure email settings and schedule as normal.

Example email from the test:


exMon Contact Us