# Start from scratch every time you read a file for window logstash-input-file

**URL:** https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512
**Category:** Logstash
**Created:** [November 6, 2020, 10:08am UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512 "2020-11-06T10:08:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![xiaoping1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xiaoping1993/32/77996_2.png) [@xiaoping1993](https://discuss.elastic.co/u/xiaoping1993)
#### Post date: [November 6, 2020, 10:08am UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512/1 "2020-11-06T10:08:50Z")

</div>

I know if linux just set  
sincedb\_path =\> "/dev/null"  
but my os is window,and I find a method set sincedb\_path =\> "NUL",and it's not useful  
so if I want to realized this effect ,how I can do

---

<div class="post-metadata">

### Author: ![SilverFJR](https://avatars.discourse-cdn.com/v4/letter/s/7ba0ec/32.png) [@SilverFJR](https://discuss.elastic.co/u/SilverFJR)
#### Post date: [November 9, 2020, 12:35pm UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512/2 "2020-11-09T12:35:28Z")

</div>

I've got these lines in my windows conf file, they seem to work...

```
			start_position => "beginning"
			sincedb_path => "NUL"
```

---

<div class="post-metadata">

### Author: ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)
#### Post date: [November 9, 2020, 1:12pm UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512/3 "2020-11-09T13:12:29Z")

</div>

Give a full path to your sincedb\_path or remove it

```auto
sincedb_path => "C:/Users/xxx/Desktop/FortiGate/traffic.log.sincedb"

```

If you don't provide it, logstash will automatically add a new one, I recommand that you set one

```auto
C:\logstash\data\plugins\inputs\file\.sincedb_5827d2ab6eb5f64d39132ba39f70c70e

```

---

<div class="post-metadata">

### Author: ![xiaoping1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xiaoping1993/32/77996_2.png) [@xiaoping1993](https://discuss.elastic.co/u/xiaoping1993)
#### Post date: [November 10, 2020, 3:55am UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512/4 "2020-11-10T03:55:31Z")

</div>

is ok?  
but my computer is not usefull  
are you sure that you can read from beginng every time when your logstash trigger read operation

---

<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: [December 8, 2020, 3:55am UTC](https://discuss.elastic.co/t/start-from-scratch-every-time-you-read-a-file-for-window-logstash-input-file/254512/5 "2020-12-08T03:55:31Z")

</div>

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