What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitor multiple files in a folder

Votes:

0

Hello, guys!

I need to monitor the change of lots of different files in a folder, all of them following a name pattern, like SX*.dtc. I need to get notifications everytime some files with this name (except one), is changed.

How can I do that?

files folder multiple

Created on Dec 1, 2015 8:03:45 PM



3 Replies

Votes:

0

This is unfortunately not possible, since sensors like File/Folder/File Content Sensors do not support applying wildcards or a combination of wildcards and exclusions.

Kind regards.

Created on Dec 3, 2015 2:29:36 PM by  Erhard Mikulik [Paessler Support]



Votes:

11

Hi peresbr

Maybe you can try with a custom batch sensor like this:

forfiles /d -10 /P c:\Data /M SX*.dtc
IF %ERRORLEVEL% EQU 1 EXIT 1
IF %ERRORLEVEL% EQU 2 EXIT 2

:: ErrorLevel 1 if no Files found older than 10 days 
:: ErrorLevel 0 if Files are found older than 10 days

It checks for files with searchmask SX*.dtc in the folder c:\data. If there IS a file older than 10days it exits with 1 else Exit with 2.

regards Thomas

Created on Dec 4, 2015 9:12:45 AM



Votes:

3

Dear Thomas

Thank you for your input. Please allow me to comment that this bat is not yet a full PRTG Exe/Script sensor.

  • It should begin with @echo off to disable unwanted console output
  • The sensor must create an output on the console. for example:
echo 0:No files found older than 10 days

or

echo 1:Files older than 10 days present

The part before the colon is the actual data recorded as historic data, the part after the colon is the current status message.

Created on Dec 4, 2015 10:04:27 AM by  Arne Seifert [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.