---
title: "How to check the version attribute of a Windows file"
description: "The version attribute of a Windows file can be checked using the WMI plug-in in Geneos. The WMI sampler configuration extracts file version data from the CIM\\DataFile namespace based on specified conditions."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004027069-geneos-how-to-check-the-version-attribute-of-a-windows-file/index.html"
---
## Solution

This can be extracted using the [WMI plug-in](https://docs.itrsgroup.com/docs/geneos/current/collection/windows-wmi/index.html).

Below are screenshots of a WMI sampler configuration, resulting dataview and the actual Windows folder:

- WMI sampler configuration
  - Class: The WMI namespace to be used. In the below configuration, the namespace CIM\_DataFile is used as this contains the data of the files in the Windows OS
  - Column: These are the columns or properties of the CIM\_DataFile namespace. You can extract the columns of a namespace via Window's wbemtest.exe (C:\Windows\System32\wbem\wbemtest.exe) or via Google
  - Restriction: This contains the conditions you want to extract from the namespace.

- The sampler below will get the file versions of all files with the extension "exe" in the folder "D:\Windows\"![7871530512925 mceclip0](https://docscdn.itrsgroup.com/faq/images/geneos/115004027069-7871530512925-mceclip0.png)

- Dataview

  - ![8407933616797 mceclip1](https://docscdn.itrsgroup.com/faq/images/geneos/115004027069-8407933616797-mceclip1.png)

- Windows folder

  - ![8408017489053 mceclip2](https://docscdn.itrsgroup.com/faq/images/geneos/115004027069-8408017489053-mceclip2.png)

## Reference

 Attached is the [sampler XML](/faq/downloads/geneos/115004027069-inline-attachment-1-sampler_WMI_File_Attributes.xml).

## Related downloads

- [sampler_WMI_File_Attributes.xml](/faq/downloads/geneos/115004027069-8408113223453-sampler_WMI_File_Attributes.xml)


