# FTP download: inject remote filename

**URL:** <https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770>\
**Category:** General\
**Created:** [22 September 2019 08:57 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770 "2019-09-22T08:57:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cktl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cktl/32/12344_2.png) [@cktl](https://discourse.nodered.org/u/cktl)\
**Post date:** [22 September 2019 08:57 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770/1 "2019-09-22T08:57:32Z")

</div>

I'm a beginner met node-red and want to look for files on a remote ftp location and download a filtered subset to a local dir. I use node-red-contrib-ftp for the LIST operation. How can I inject the filenames I got back from the LIST to the GET node? The GET has a Filename and Local Filename property. If I put a hardcoded filename in it, my flow works.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 September 2019 09:35 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770/2 "2019-09-22T09:35:41Z")

</div>

Start by reading the working with messages section from the docs. Then look at the structure of the data coming from the LIST command and work out what you have to do.  
[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![cktl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cktl/32/12344_2.png) [@cktl](https://discourse.nodered.org/u/cktl)\
**Post date:** [22 September 2019 09:56 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770/3 "2019-09-22T09:56:17Z")

</div>

I'm able to parse the results from the LIST command. I can even filter the results based on my needs. That's not my problem. My problem is how to inject the filenames I got from my results into the FTP - GET node? I tried to create a message with the Filename property but is doesn't work.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 September 2019 09:58 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770/4 "2019-09-22T09:58:33Z")

</div>

Feed your effort at putting the filename in a message into a debug node and see if it looks as if it matches the node's requirements. If you think that it does match but doesn't work then show us what you see in the debug node.  
Also tell us what 'doesn't work' means. Do you get an error of some sort?

---

<div class="post-metadata">

**Author:** ![cktl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cktl/32/12344_2.png) [@cktl](https://discourse.nodered.org/u/cktl)\
**Post date:** [24 September 2019 06:01 UTC](https://discourse.nodered.org/t/ftp-download-inject-remote-filename/15770/5 "2019-09-24T06:01:03Z")

</div>

I found the solution. I used localfilename instead of localFilename, so the case sensitivity was the problem that nothing happened with no error messages. Now it works just fine.  
@Colin thanks for your help.
