# Is it possible to create multiple index with multiple folder name

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-create-multiple-index-with-multiple-folder-name/321457>\
**Category:** Logstash\
**Created:** [December 17, 2022, 3:35pm UTC](https://discuss.elastic.co/t/is-it-possible-to-create-multiple-index-with-multiple-folder-name/321457 "2022-12-17T15:35:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 17, 2022, 4:53pm UTC](https://discuss.elastic.co/t/is-it-possible-to-create-multiple-index-with-multiple-folder-name/321457/3 "2022-12-17T16:53:13Z")

</div>

You can use grok to extract a directory name from a path. Examples are [here](https://discuss.elastic.co/t/adding-a-type-field-dynamically-for-logs/73883/9) and [here](https://discuss.elastic.co/t/extracting-particular-folder-from-the-path-and-adding-that-to-a-field/142277/4). Depending on your versions and ECS compatibility the path of the file will likely be in [path] or, more recently [log][file][path]

---

_[View the full topic](https://discuss.elastic.co/t/is-it-possible-to-create-multiple-index-with-multiple-folder-name/321457)._
