File input - Windows style paths not supported


When using the file and trying to get all files in C:\myfolder, the following setup will not work.

input {
file {
path => "C:\\myfolder

The issue seems to come from the use of Dir#glob -

When using Dir.glob, \ is treated as a special character for escaping - The path entered into Logstash appears to be handed in unadultered to FileWatch::Watch, so the Dir.glob call fails to find any results.

The easy fix is to change all paths to unix style, so instead of C:\\myfolder
.log it becomes C:/myfolder/.log (which I like more anyway ). However for a Windows user this would be pretty confusing and there is no indication that the file path is wrong.


Logstash Developers


JP Camara


Fix versions

Affects versions