# Append or Discard Data Series on Stop Button Press

**URL:** https://discourse.nodered.org/t/append-or-discard-data-series-on-stop-button-press/80963
**Category:** General
**Tags:** node-red-dashboard
**Created:** [31 August 2023 19:52 UTC](https://discourse.nodered.org/t/append-or-discard-data-series-on-stop-button-press/80963 "2023-08-31T19:52:13Z")
**Posts on this page:** 1
**Showing post:** 4

<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: [7 September 2023 11:50 UTC](https://discourse.nodered.org/t/append-or-discard-data-series-on-stop-button-press/80963/4 "2023-09-07T11:50:32Z")

</div>

> [@Asiayqyyq](#):
>
> my question is as follows: How can I save files to an SD card in Node-RED with the filename being the current date?

You can use JSONata and $moment() in the file write node path input to append/create a date to the file name.

> [@New name for every picture](https://discourse.nodered.org/t/new-name-for-every-picture/75089/3):
>
> You can use JSONata in the file write node path input. So you can append a datetime. e.g. [{"id":"9ca58ffd6eb64591","type":"file","z":"da8a6ef0b3c9a5c8","name":"Save Picture","filename":"\"/media/Pictures/picture\" & $moment().format(\"YYYYMMDD\_HHmmss\") & \".jpg\"","filenameType":"jsonata","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":960,"y":4660,"wires":[[]]},{"id":"d9daf7507bf38e9f","type":"http request","z":"da8a6ef0b3c9a5c8","name":"Get Picture","m…

---

_[View the full topic](https://discourse.nodered.org/t/append-or-discard-data-series-on-stop-button-press/80963)._
