# Windows FIM Module - how to use custom path without recursive

**URL:** https://discuss.elastic.co/t/windows-fim-module-how-to-use-custom-path-without-recursive/348423
**Category:** Beats
**Tags:** auditbeat
**Created:** [December 1, 2023, 10:51am UTC](https://discuss.elastic.co/t/windows-fim-module-how-to-use-custom-path-without-recursive/348423 "2023-12-01T10:51:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![s0p4L1n3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/s0p4l1n3/32/128200_2.png) [@s0p4L1n3](https://discuss.elastic.co/u/s0p4L1n3)
#### Post date: [December 1, 2023, 10:51am UTC](https://discuss.elastic.co/t/windows-fim-module-how-to-use-custom-path-without-recursive/348423/1 "2023-12-01T10:51:52Z")

</div>

Hello,

I have Windows Client and Windows DFS Server with multiple shares.  
I want to monitor File/folder activities aka File Integrity Monitoring.

I already tried with Winlogbeat by monitoring Event ID 4656 and 4663 but I can't differentiate some access permission between a real user action and computer action, so the logs are very big and I can't drop them without missing some useful data.

I'm now testing Auditbeat on windows and I would like to know if it is possible to monitor specific folders path like this one:

```auto
auditbeat.modules:
- module: file_integrity
  paths:
  - '%userprofile%/Downloads'
  recursive: false

```

I tried also:

```auto
paths:
  - 'C/Users/*/Downloads'

```

OR

```auto
paths:
  - 'C/Users/**/Downloads'

```

But I get errors:

```auto
Failed to add watch	{"file_path": "%userprofile%/Downloads", "error": "GetFileAttributes: Le chemin d’accès spécifié est introuvable."}

```

Is it possible to use some env variable instead of static path ?

If I monitor 'C:\Users' with recursive mode, it logs every action even the one done by the computer itself or apps.

Another solutions would be to know how to differentiate a real user action vs computer action.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [December 29, 2023, 12:52pm UTC](https://discuss.elastic.co/t/windows-fim-module-how-to-use-custom-path-without-recursive/348423/2 "2023-12-29T12:52:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
