CSV Writer into separate files

I am new with Knime, so sorry for my possible stupid question:

I have a program, which processes spectrometric raw-data. It works for various files in a loop and puts the processed data with the CSV-Writer into one file. Now, there is no option in the CSV-Writer to create a new file - only to append to the existing file.

How could I solve the problem and get a new file for every processed file/loop?

Thank you in advance!

 

You need to put the CSV file before the end of the loop if you want one file per iteration. You will need to create the filename as a flow variable during the loop. You could for example append the iteration each time. 

Hi all,

i have the same problem as described by dioxxide. If i put the CSV file before the end of the loop - all calculation was done only for one file. The result is one file per iteration (per one file - for each column) but not the iteration per file. 

How could I solve the problem and get a new file for every processed file/loop?

Thank you in advance!

You may use flow variables for the filename section in csv writer’s flow variables tab within configuration dialog window. This might solve the problem because otherwise each iteration will overwrite the same file and the file contains only the data from the last iteration.

Hi all, 

thanks for the fast answer. Unfortunally it does not work... Error report is: "can`t determine parent directory of file "2" " Please help me...

Thanks

Use Table Creator node for the root of path like "E:\user\folder\" then combine it with the each file name via Cross Joiner and Column Combiner (probably Column Resorter will also be needed) so you can have the full path as a flow variable.

This works for me!

 

Sorry i do not understand it - it is possible to create a workflow to examplified how i can do it in my workflow... 

Thanks