Should I use a split node or a loop?

Hi,
I have a folder (*C:\Temp\Data*) containing zip files, in each zip file there will be many csv files

split-or-loop-1

For each zip file I need to extract, then check if the csv files inside it are properly or incorrectly formatted.

I used the split node to split each zip file for processing:

In case the csv file is set permission can not read, when reading the CSV file to check its information an exception will occur, at this point the node-red application is terminated without processing the next zip file.

I want when processing each zip file, assuming the Data_0002.zip file has an exception, will continue to process the Data_0003.zip file, not end the node-red application, use the split node as currently possible do this? Or do I have to use a loop?

When the exception occurred, I used the catch node handle to get an error, with the loop I know how to continue processing the Data_0003.zip file, but for the split node I don't know how ...

Please tell me.
Thanks!

The exception should not kill the whole NR application. It should kill that message, independently of any others. If it's terminating NR, turning it into a loop won't make any difference. What error are you getting?

1 Like

I got it.
Thank you very much!

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