# Logstash not flushing file to output directory

**URL:** <https://discuss.elastic.co/t/logstash-not-flushing-file-to-output-directory/149555>\
**Category:** Logstash\
**Created:** [September 22, 2018, 3:51pm UTC](https://discuss.elastic.co/t/logstash-not-flushing-file-to-output-directory/149555 "2018-09-22T15:51:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shwetabhsuman](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@shwetabhsuman](https://discuss.elastic.co/u/shwetabhsuman)\
**Post date:** [September 22, 2018, 3:51pm UTC](https://discuss.elastic.co/t/logstash-not-flushing-file-to-output-directory/149555/1 "2018-09-22T15:51:12Z")

</div>

Hi,  
I am trying logstash in windows filesystem where I am trying to put file from one directory to other directory.

My logstash.conf file is : -  
input {  
file {  
path =\> "C:/logstash/in.log"  
}  
}  
output {  
file {  
path =\> "C:/logstashnew/outlog.log"  
}  
}

I have created C:/logstash/in.log file.when I try to run logstash by issuing:  
logstash/bin\> logstash -f /logstash.conf  
but file was not copied to "C:/logstashnew/outlog.log"

Log generated:

C:\logstash-6.4.1\logstash-6.4.1\bin\>logstash -f logstash.conf  
Sending Logstash logs to C:/logstash-6.4.1/logstash-6.4.1/logs which is now configured via log4j2.properties  
[2018-09-22T16:21:56,414][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2018-09-22T16:21:57,480][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"6.4.1"}  
[2018-09-22T16:22:01,550][INFO][logstash.pipeline] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50}  
[2018-09-22T16:22:02,708][INFO][logstash.inputs.file] No sincedb\_path set, generating one based on the "path" setting {:sincedb\_path=\>"C:/logstash-6.4.1/logstash-6.4.1/data/plugins/inputs/file/.sincedb\_d7c2d93c7e9416388d9cdd03920ef37e", :path=\>["C:\logstash\in.log"]}  
[2018-09-22T16:22:02,801][INFO][logstash.pipeline] Pipeline started successfully {:pipeline\_id=\>"main", :thread=\>"#\<Thread:0x1309f6ab run\>"}  
[2018-09-22T16:22:02,911][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>[]}  
[2018-09-22T16:22:02,949][INFO][filewatch.observingtail] START, creating Discoverer, Watch with file and sincedb collections  
[2018-09-22T16:22:03,517][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}

Please guide

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 26, 2018, 4:38am UTC](https://discuss.elastic.co/t/logstash-not-flushing-file-to-output-directory/149555/2 "2018-09-26T04:38:41Z")

</div>

How do you know that Logstash is reading anything from the input file? As you've configured it Logstash will only read new lines appended to the file. Check out the `start_position` option of the file input and read what its documentation says about sincedb.

---

<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:** [October 24, 2018, 4:38am UTC](https://discuss.elastic.co/t/logstash-not-flushing-file-to-output-directory/149555/3 "2018-10-24T04:38:44Z")

</div>

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