# Excluded\_files doesn't seem to work

**URL:** <https://discuss.elastic.co/t/excluded-files-doesnt-seem-to-work/279918>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [July 28, 2021, 10:32pm UTC](https://discuss.elastic.co/t/excluded-files-doesnt-seem-to-work/279918 "2021-07-28T22:32:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prandelicious](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prandelicious/32/91510_2.png) [@prandelicious](https://discuss.elastic.co/u/prandelicious)\
**Post date:** [July 28, 2021, 10:32pm UTC](https://discuss.elastic.co/t/excluded-files-doesnt-seem-to-work/279918/1 "2021-07-28T22:32:07Z")

</div>

I used the default **excluded\_files** example:

```auto
    excluded_files:
      - '(?i)\.sw[nopx]$'
      - ~$
      - /\.git($|/)

```

but it still logs temporary files created by vim like `.<filename>.swp` or `~<filename>`.

I also tried this:

```auto
    excluded_files:
      - '(?i).*\.sw[nopx]$'

```

but it also doesn't work. I'm using **auditbeat-7.13.4-1.x86\_64**.

---

<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:** [August 26, 2021, 12:32am UTC](https://discuss.elastic.co/t/excluded-files-doesnt-seem-to-work/279918/2 "2021-08-26T00:32:34Z")

</div>

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