# File node: how to create an uniquely named file every time the node gets data passed through it?

**URL:** https://discourse.nodered.org/t/file-node-how-to-create-an-uniquely-named-file-every-time-the-node-gets-data-passed-through-it/22177
**Category:** General
**Created:** [24 February 2020 09:53 UTC](https://discourse.nodered.org/t/file-node-how-to-create-an-uniquely-named-file-every-time-the-node-gets-data-passed-through-it/22177 "2020-02-24T09:53:26Z")
**Posts on this page:** 1
**Showing post:** 7

<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: [24 February 2020 17:28 UTC](https://discourse.nodered.org/t/file-node-how-to-create-an-uniquely-named-file-every-time-the-node-gets-data-passed-through-it/22177/7 "2020-02-24T17:28:52Z")

</div>

If you use a Retained topic in MQTT then that will remember it for you. Alternatively you could use Persistent Context in node-red.

> [@A guide to understanding 'Persistent Context'](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115):
>
> This is something I wrote up after playing with the context options. I've filed a PR with some of this added to the Node-RED documentation but thought I'd release it here also. I hope people find it useful. Paul A guide to understanding 'Persistent Context' Prior to Node-RED v0.19.0, data could be stored in context as a global, flow or node. This was stored in memory and would be reset with a restart of Node-RED. As of v.0.19.0 you can now store node, flow and global context data in memory O…

**[Edit]** But I like @hotNipi's idea better.

---

_[View the full topic](https://discourse.nodered.org/t/file-node-how-to-create-an-uniquely-named-file-every-time-the-node-gets-data-passed-through-it/22177)._
