Append or Discard Data Series on Stop Button Press

That is the path i used in testing on my machine, you would edit it to the path of the folder where your files are, i presume /csv_files/. Maybe you could look at links provided to get some answers.

1 Like

Everything works thanks for your help

The file name of the downloaded file is the entire path and I would like it to be only payload.file.

Have you attempted to change the msg.filename after the file read node?
Try googling split file name from path using javascript. you may learn something.

I don't know how I tried this way and got undefined.

msg.filename = msg.payload.file;
return msg;

Let me google that for you

Remember you are using msg.filename , not msg.payload.file.

var path = msg.filename;
var parts = path.split('/');
var filename = parts[parts.length - 1];
msg.filename = filename;

return msg;

I did it this way and it works so far.

1 Like

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