# Fs-file-lister: pre fill path from msg.payload

**URL:** <https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110>\
**Category:** Dashboard\
**Created:** [20 September 2020 13:38 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110 "2020-09-20T13:38:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![manjha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manjha/32/29301_2.png) [@manjha](https://discourse.nodered.org/u/manjha)\
**Post date:** [20 September 2020 13:38 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/1 "2020-09-20T13:38:12Z")

</div>

I am using the fs-file-lister node to read info from a file. When I hard code the file path, this works great, content of the file is read.  
But I want to be able to feed the path information to the node via msg.payload. Seems like a logical thing to do, but somehow I can't get the syntax right.  
It must be simple, but I can't get it right.  
Can someone help me with an example?

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [20 September 2020 14:54 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/2 "2020-09-20T14:54:57Z")

</div>

can you provide your flow that isn't working?  
are you using node-red-contrib-fs?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 September 2020 00:19 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/3 "2020-09-21T00:19:13Z")

</div>

msg.payload is an object with any of the following properties that mirror the settings shown in the Editor:

start, pattern, folders, lstype, hidden, path, single, depth, stat

> <https://github.com/TotallyInformation/node-red-contrib-fs/blob/master/fs/fs-file-lister.js#L103-L159>

---

<div class="post-metadata">

**Author:** ![manjha](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manjha/32/29301_2.png) [@manjha](https://discourse.nodered.org/u/manjha)\
**Post date:** [21 September 2020 08:31 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/4 "2020-09-21T08:31:23Z")

</div>

Thank you, that helped!  
I am just wondering where I could have found this myself, in stead of asking on this great forum?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [21 September 2020 09:03 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/5 "2020-09-21T09:03:49Z")

</div>

It should be in the documentation for the node. As this is my node, if the information is missing, the best approach is to raise an Issue on GitHub.

For node authors not as responsive as me 😉 ultimately the source code is the best place to look.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 October 2020 09:03 UTC](https://discourse.nodered.org/t/fs-file-lister-pre-fill-path-from-msg-payload/33110/6 "2020-10-21T09:03:56Z")

</div>

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