# Exclude log files with filename containing a particular string

**URL:** <https://discuss.elastic.co/t/exclude-log-files-with-filename-containing-a-particular-string/222476>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [March 6, 2020, 2:55pm UTC](https://discuss.elastic.co/t/exclude-log-files-with-filename-containing-a-particular-string/222476 "2020-03-06T14:55:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdamJade](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@AdamJade](https://discuss.elastic.co/u/AdamJade)\
**Post date:** [March 6, 2020, 2:55pm UTC](https://discuss.elastic.co/t/exclude-log-files-with-filename-containing-a-particular-string/222476/1 "2020-03-06T14:55:05Z")

</div>

Hi there

I'm trying to ingest log files from a directory but i want exclude files log files containing '_ALL_' string in their name.

I tried exclude\_files: ['^_ALL_'] but file name like this  
FAg\_ALL\_ToutesLogsOrdreHistoriques\_AFG.WCFHosting.ServicesExternes.exe.log  
is processed.  
thanks for any help

---

<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:** [April 3, 2020, 2:55pm UTC](https://discuss.elastic.co/t/exclude-log-files-with-filename-containing-a-particular-string/222476/2 "2020-04-03T14:55:11Z")

</div>

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