Xymon Mailing List Archive search

How to verify DIR content with wildcards on a Windows host?

list Anaïs Rabinoit
Tue, 17 Apr 2018 09:27:30 +0000
Message-Id: <user-246d09c30ff8@xymon.invalid>

Hi everyone,


I have to check if a directory on a windows host contains files with a specific extension.


If it was a Unix/Linux host, i just have to write something like that i guess :

client-local.cfg :

    file:`find /path/mydir/*.tst`

analysis.cfg :

    FILE    %(/path/mydir/*.tst)    noexist


But how to do it for a Windows host? Is this possible ?


I tried this for example :


client-local.cfg :

    file:`cmd /c "dir /b /s C:\path\mydir\*.tst"`

or

    file:`cmd /c "dir /b /s \path\mydir\*.tst"`


analysis.cfg :

    FILE    "%C:\path\mydir\*.tst"    noexist


But it doesn't work :(


Regards,


Anaïs