Check if folder is empty


I want to check if a folder is empty (no files and no fubfolders).
I already found this: [Check_mk (english)] windows - check if a folder is empty
but it does only count files and not subfolders.
Is there a way to also monitor the subfolders?

AFAIK there is no way to monitor if there are sub-directories.
Guess a local check is not a big deal to develop:

1 Like


thank you for your answer. I’ve already developed a local check with powershell.

Vieleicht hilt dir in den Trasures auch das eine oder andere



aber ich mache es ähnlich mittels VBS und dann an den Agent angehangen