# Set filename property to the "tail node"

**URL:** <https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075>\
**Category:** General\
**Created:** [30 October 2020 13:33 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075 "2020-10-30T13:33:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fucio7](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@Fucio7](https://discourse.nodered.org/u/Fucio7)\
**Post date:** [30 October 2020 13:33 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/1 "2020-10-30T13:33:19Z")

</div>

I'm trying to figure out how to set the filename of the "tail node" using a function node.  
Reading the documentation it seems possible: `filename: "If not configured in the node, this optional property sets the name of the file to be tailed. If an empty string "" is received, the tailing will stop."`  
The node doesn't have any input (I mean the white square), so how to send a message with the `filename` property set?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [30 October 2020 13:36 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/2 "2020-10-30T13:36:46Z")

</div>

`msg.filename = "the path to file";`

---

<div class="post-metadata">

**Author:** ![Fucio7](https://avatars.discourse-cdn.com/v4/letter/f/aeb1de/32.png) [@Fucio7](https://discourse.nodered.org/u/Fucio7)\
**Post date:** [30 October 2020 13:38 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/3 "2020-10-30T13:38:24Z")

</div>

I know that I have to write that code, but how to pass the `msg` to the node? I can't attach anything to it.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [30 October 2020 13:43 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/4 "2020-10-30T13:43:00Z")

</div>

Must be a typo in the help info, as you say there is no input.

---

<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:** [30 October 2020 13:54 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/5 "2020-10-30T13:54:14Z")

</div>

If you open the node and close it again the input will appear, provided you have not entered a filename. It is a little unfortunate that it does not show the input immediately on placing it.

---

<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:** [13 November 2020 13:54 UTC](https://discourse.nodered.org/t/set-filename-property-to-the-tail-node/35075/6 "2020-11-13T13:54:21Z")

</div>

Closed on 13 November 2020 13:54 UTC

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