# Copy Xml Files from Filebeat to logstash

**URL:** <https://discuss.elastic.co/t/copy-xml-files-from-filebeat-to-logstash/165225>\
**Category:** Logstash\
**Created:** [January 22, 2019, 11:45am UTC](https://discuss.elastic.co/t/copy-xml-files-from-filebeat-to-logstash/165225 "2019-01-22T11:45:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TEJASWI\_CHUNDURI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tejaswi_chunduri/32/46271_2.png) [@TEJASWI\_CHUNDURI](https://discuss.elastic.co/u/TEJASWI_CHUNDURI)\
**Post date:** [January 22, 2019, 11:45am UTC](https://discuss.elastic.co/t/copy-xml-files-from-filebeat-to-logstash/165225/1 "2019-01-22T11:45:06Z")

</div>

I just need to copy the file from filebeat to logstash . Please find the below file where i am trying to copy the file to logstash in a folder (/etc/logstash/appscan\_reports/xml) and trying to execute some script on it , Please help

```
input {
    beats {
    port => 5044
  }
}
output {
    exec {
        command => "sudo cp %{message} /etc/logstash/appscan_reports/xml;sudo powershell -ExecutionPolicy ByPass -File /etc/logstash/ReadXml.ps1 /etc/logstash/appscan_reports/xml /etc/logstash/appscan_reports/json"
        interval => 60
        }
    stdout{
        codec =>rubydebug
        }
}
```

---

<div class="post-metadata">

**Author:** ![TEJASWI\_CHUNDURI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tejaswi_chunduri/32/46271_2.png) [@TEJASWI\_CHUNDURI](https://discuss.elastic.co/u/TEJASWI_CHUNDURI)\
**Post date:** [January 22, 2019, 4:16pm UTC](https://discuss.elastic.co/t/copy-xml-files-from-filebeat-to-logstash/165225/2 "2019-01-22T16:16:24Z")

</div>

@Badger

---

<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:** [February 19, 2019, 4:34pm UTC](https://discuss.elastic.co/t/copy-xml-files-from-filebeat-to-logstash/165225/3 "2019-02-19T16:34:37Z")

</div>

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