# Unable to input files in multiple directory levels

**URL:** <https://discuss.elastic.co/t/unable-to-input-files-in-multiple-directory-levels/161590>\
**Category:** Logstash\
**Created:** [December 19, 2018, 8:31pm UTC](https://discuss.elastic.co/t/unable-to-input-files-in-multiple-directory-levels/161590 "2018-12-19T20:31:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrianZimmel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brianzimmel/32/38306_2.png) [@BrianZimmel](https://discuss.elastic.co/u/BrianZimmel)\
**Post date:** [December 19, 2018, 8:31pm UTC](https://discuss.elastic.co/t/unable-to-input-files-in-multiple-directory-levels/161590/1 "2018-12-19T20:31:51Z")

</div>

Hello. I'm having trouble configuring the logstash file input plugin with a path pattern to perform a recursive search across multiple levels in a particular directory. Every time I run logstash it never picks up any of the existing files. When I set the file path to a specific file, it reads it. When I set the file path to recursively search the directory level above the files, it reads them. When I set the next level up to be recursively searched, nothing happens. I am using read mode and have cleared the sincedb file. What am I missing?

Here is an example of my directory structure:

```
/data/extract/sample/012018/a1/file.xml
/data/extract/sample/012018/a2/file.xml
/data/extract/sample/022018/a1/file.xml
/data/extract/sample/032018/a1/file.xml

```

Here is an example of my input configuration

```
input {
  file {
    path => "/data/extract/sample/**/*"
    type => "xml"
    file_sort_by => "path"
    mode => "read"
    file_completed_action => "log"
    file_completed_log_path => "/var/log/logstash/completed.log"
    sincedb_path => "/var/log/logstash/sincedb.log"
    codec => multiline {
        pattern => "^<\?xml.*\?>"
        negate => true
        what => "previous"
        auto_flush_interval => 1
        max_lines => 300000
    }
  }
}
```

---

<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:** [January 16, 2019, 8:31pm UTC](https://discuss.elastic.co/t/unable-to-input-files-in-multiple-directory-levels/161590/2 "2019-01-16T20:31:55Z")

</div>

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