---
title: "How to monitor existence of folders with Windows WMI plugin?"
description: "Monitoring the existence of folders can be done using the Windows WMI plugin by querying the Win32\\Directory class. The plugin supports filtering folder names with the Restriction field using the LIKE keyword and wildcards, with configuration examples provided."
url: "https://docs.itrsgroup.com/docs/faq/geneos/360021354093-geneos-how-to-monitor-existence-of-folders-with-windows-wmi-plugin/index.html"
---
ITRS Geneos users can consider using the WMI plugin to query the `Win32\`_Directory class.

The following is an example that returns all directories under `C:\Windows`. The sampler configuration in [XML](/faq/downloads/geneos/WMI_Windows_Folder.xml.txt) is attached in this article.

![Restriction in WMI plugin](https://docscdn.itrsgroup.com/faq/images/geneos/restriction-plugin.png)

The Active Console will display a dataview similar to the below screen capture.

![Windows WMI dataview.](https://docscdn.itrsgroup.com/faq/images/geneos/Windows-WMI-dataview.png)

One useful feature of the WMI plugin is that it can filter the results based on patterns. This can be achieved with the **Restriction** field, which can use `LIKE` keyword with `%` as wildcard character. So for example, the following will list folder names starting with `app`.

```
Drive='C:' AND Path='\\Windows\\' AND FileName like 'app%'
```

For more information, see [Windows WMI plugin documentation](https://docs.itrsgroup.com/docs/geneos/current/collection/windows-wmi/). For the specification of Windows Management Instrumentation (WMI) and `Win32\_` Directory class, check the documentation of [Microsoft](https://docs.microsoft.com/).


