# Following files in rotating directories

**URL:** <https://discuss.elastic.co/t/following-files-in-rotating-directories/507>\
**Category:** Logstash\
**Created:** [May 11, 2015, 2:08pm UTC](https://discuss.elastic.co/t/following-files-in-rotating-directories/507 "2015-05-11T14:08:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phunqe](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@phunqe](https://discuss.elastic.co/u/phunqe)\
**Post date:** [May 11, 2015, 2:08pm UTC](https://discuss.elastic.co/t/following-files-in-rotating-directories/507/1 "2015-05-11T14:08:28Z")

</div>

Hello,

I need to follow rotating logs, but the rotation is done on directory level.

For example I need to follow file c:\logs\2015-05-11\mylog.txt which next day will be c:\logs\2015-05-12\mylog.txt and so on.

Is it possible to achieve this? I can only find examples/configurations for regular file rotations for the file input module (i.e in place in the same directory).

Thank you.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 12, 2015, 12:42am UTC](https://discuss.elastic.co/t/following-files-in-rotating-directories/507/2 "2015-05-12T00:42:38Z")

</div>

You can do multi-level globbing, eg;

```
input {
  file {
    path => ["c:\logs\*\mylog.txt"]
  }
}
```

---

<div class="post-metadata">

**Author:** ![phunqe](https://avatars.discourse-cdn.com/v4/letter/p/c77e96/32.png) [@phunqe](https://discuss.elastic.co/u/phunqe)\
**Post date:** [May 12, 2015, 7:23am UTC](https://discuss.elastic.co/t/following-files-in-rotating-directories/507/3 "2015-05-12T07:23:47Z")

</div>

Excellent, thank you!

---

<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:** [July 6, 2017, 5:40am UTC](https://discuss.elastic.co/t/following-files-in-rotating-directories/507/4 "2017-07-06T05:40:01Z")

</div>

Closed on July 6, 2017, 5:40am UTC


