# How to list files and parse them

**URL:** https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083
**Category:** General
**Created:** [17 November 2020 17:59 UTC](https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083 "2020-11-17T17:59:49Z")
**Posts on this page:** 1
**Showing post:** 18

<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: [19 November 2020 09:54 UTC](https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083/18 "2020-11-19T09:54:59Z")

</div>

In your flow, everytime you press the inject button, you re-initilize the global variables. You should make that a separate flow.

You should also go read [https://nodered.org/docs/user-guide/writing-functions#storing-data](https://nodered.org/docs/user-guide/writing-functions#storing-data) and then look at your last `function` node again (it might help to [read this thread](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115) too)

---

_[View the full topic](https://discourse.nodered.org/t/how-to-list-files-and-parse-them/36083)._
