# Give path as an argument

**URL:** https://discuss.elastic.co/t/give-path-as-an-argument/269173
**Category:** Logstash
**Created:** [April 4, 2021, 9:08am UTC](https://discuss.elastic.co/t/give-path-as-an-argument/269173 "2021-04-04T09:08:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vincedt09](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincedt09/32/85366_2.png) [@vincedt09](https://discuss.elastic.co/u/vincedt09)
#### Post date: [April 4, 2021, 9:08am UTC](https://discuss.elastic.co/t/give-path-as-an-argument/269173/1 "2021-04-04T09:08:28Z")

</div>

Hi!  
Is there a way to give path as an argument?

I was thinking at something like this:

```
input {

    file {

        path => argv

        sincedb_path => "NUL"

        start_position => "beginning"

    }

}

```

> logstash c:\path\_to\_file\input\_file.csv -f logstash\_config.conf

Thanks,  
Vince

---

<div class="post-metadata">

### Author: ![aaron-nimocks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aaron-nimocks/32/73965_2.png) [@aaron-nimocks](https://discuss.elastic.co/u/aaron-nimocks)
#### Post date: [April 4, 2021, 12:50pm UTC](https://discuss.elastic.co/t/give-path-as-an-argument/269173/2 "2021-04-04T12:50:52Z")

</div>

You can use [environment variables](https://www.elastic.co/guide/en/logstash/current/environment-variables.html). Not quite the same but you could get it to work depending on what you are trying to do.

---

<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: [May 2, 2021, 12:51pm UTC](https://discuss.elastic.co/t/give-path-as-an-argument/269173/3 "2021-05-02T12:51:45Z")

</div>

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