# Reading text file, removing filename

**URL:** <https://discourse.nodered.org/t/reading-text-file-removing-filename/31907>\
**Category:** General\
**Created:** [23 August 2020 15:06 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907 "2020-08-23T15:06:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [23 August 2020 15:06 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907/1 "2020-08-23T15:06:07Z")

</div>

Hello  
if i insert the array by hand it works. If i read it from the file I have the same information in the object, but the file path is below. This seems to disturb the further flow, because the function does not process the array if delivers by file

 ![1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c4a717dcce494f2ba03efd51ecc59d416fb12c10.jpeg)  
Debug  
 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/8/988fc2193fa94e901582f2c7f5ff455f30a8a2fd.jpeg)  
How do I remove this information filename:" ......"

I would be grateful for any assistance as I do not understand where this information is hidden.  
so I cannot remove it ☹

THX Marc

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 August 2020 15:27 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907/2 "2020-08-23T15:27:44Z")

</div>

Have you tried a change node?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/392f4ab6c500ba97f266875e57bb2993272c9677.png)

> [@edstobi](#):
>
> I do not understand where this information is hidden

Its not hidden, it is part of `msg` (as your debug show)

your data is in `msg.payload` whereas the file name is in `msg.filename`

---

<div class="post-metadata">

**Author:** ![edstobi](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@edstobi](https://discourse.nodered.org/u/edstobi)\
**Post date:** [23 August 2020 19:52 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907/3 "2020-08-23T19:52:08Z")

</div>

Many thanks  
This are the informations that we newbies are still missing and we collect our experiences.  
the conversion was then so easy and I have tried sooooo many other things in the approach field.  
Thanks for the answer.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [23 August 2020 20:04 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907/4 "2020-08-23T20:04:05Z")

</div>

> [@edstobi](#):
>
> Many thanks

You're welcome.

In my early days of node-red (before realising all the features and where to use what) I would have done the JavaScript way (in a function node)...

```auto
delete msg.filename;
return msg;

```

> [@edstobi](#):
>
> This are the informations that we newbies are still missing and we collect our experiences

We all start somewhere.

If you want a good measure of the features, spend an hour with this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). It is by the developers of node-red. Each video in the playlist is nice & short and to the point - easy to digest.

---

<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:** [6 September 2020 20:04 UTC](https://discourse.nodered.org/t/reading-text-file-removing-filename/31907/5 "2020-09-06T20:04:10Z")

</div>

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