# Searching subdirectories

**URL:** <https://discuss.elastic.co/t/searching-subdirectories/64648>\
**Category:** Beats\
**Created:** [November 2, 2016, 1:43am UTC](https://discuss.elastic.co/t/searching-subdirectories/64648 "2016-11-02T01:43:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sankar\_Sundaresan](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@Sankar\_Sundaresan](https://discuss.elastic.co/u/Sankar_Sundaresan)\
**Post date:** [November 2, 2016, 1:43am UTC](https://discuss.elastic.co/t/searching-subdirectories/64648/1 "2016-11-02T01:43:52Z")

</div>

I am trying to setup filebeat to collect all the files within a folder. Here is the folder structure

> Main  
> ├───subdir1A  
> │ ├───subdir1B  
> | │ ├───subdir1C  
> | | | ├───file1  
> | | | ├───file2  
> | | | ├───file3  
> | | | ├───file4  
> | │ ├───subdir2C  
> | | | ├───file5  
> | | | ├───file6  
> | | | ├───file7  
> │ ├───subdir2B  
> | | ├───....  
> │ ├───subdir3B  
> | | ├───....  
> │ ├───subdir4B  
> | | ├───....  
> ├───subdir2A  
> │ ├───subdir5B  
> | | ├───....  
> │ ├───subdir6B  
> | | ├───....  
> │ ├───subdir7B  
> | | ├───....

My `filebeat.yml` file is setup like this:

> filebeat.prospectors:
> 
> - input\_type: log  
> paths:
> - C:/Users/Person/Desktop/Main/\*  
> output.logstash:  
> hosts: ["localhost:5044"]

I am unable to however read any file. I have 2 issues here that I think are causing the problem:

1. Filebeat is not recursively going down the directories until it reaches the files
2. The files in question are actually just un-extensioned files. In the window explorer their type is listed as just `File`. These are log files generated by another application and I can open them up with a text editor to read them just fine but they don't have any extension like `.log` or `.txt` or anything like that.

Any ideas how to fix this?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [November 2, 2016, 9:21am UTC](https://discuss.elastic.co/t/searching-subdirectories/64648/2 "2016-11-02T09:21:39Z")

</div>

For 1, best have a look at [https://github.com/elastic/beats/issues/2084](https://github.com/elastic/beats/issues/2084)  
For 2: As long as the files have one event per line and are not in a binary format, this should not be an issue.

---

<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:** [November 23, 2016, 1:43am UTC](https://discuss.elastic.co/t/searching-subdirectories/64648/3 "2016-11-23T01:43:58Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
