# Dynamically set msg.filepath to watch node?

**URL:** <https://discourse.nodered.org/t/dynamically-set-msg-filepath-to-watch-node/71123>\
**Category:** General\
**Created:** [23 November 2022 15:25 UTC](https://discourse.nodered.org/t/dynamically-set-msg-filepath-to-watch-node/71123 "2022-11-23T15:25:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/josh/32/62208_2.png) [@Josh](https://discourse.nodered.org/u/Josh)\
**Post date:** [23 November 2022 15:25 UTC](https://discourse.nodered.org/t/dynamically-set-msg-filepath-to-watch-node/71123/1 "2022-11-23T15:25:51Z")

</div>

Hi Forum,  
I am wondering if we could set the path in the inbuilt watch node via msg.filepath property or any other means is welcome.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/5/65d8d56b7d8d8573927bf78e6a8bf239d8f98909.png)

---

<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:** [23 November 2022 15:42 UTC](https://discourse.nodered.org/t/dynamically-set-msg-filepath-to-watch-node/71123/2 "2022-11-23T15:42:30Z")

</div>

I think that is not possible. You could use an environment variable rather than specifying it in the flow, but that would still only be read on startup, so it is not dynamic.

---

<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:** [22 January 2023 15:42 UTC](https://discourse.nodered.org/t/dynamically-set-msg-filepath-to-watch-node/71123/3 "2023-01-22T15:42:51Z")

</div>

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