Read from and save in different folders

Hi all!
I need to do a couple of things with one file- Fist of all, I have a global file that needs to be separated into different files by company code, and I need to save the file in the folder for this company code. The folders are created, and we have around 50 company codes, so doing this one by one is not an option (but a posibility)- I am trying to do this using variables, but I am not sure how to do this.
I have to mention the folder structure: Region/Country/Company code
In the file there is a column for Region, other for Country and the last one for Company code, so probably I need to create a path based on these 3 variables…

Later, one the files are in the corresponding company code folder, I need to read all the files and combine them into a new one global file to do some checks- probably here I need to create some loop with the same variables…

Any idea?

Hello @Mariaper and welcome to the KNIME Community.

You may find useful the following challenge. I think it is very close to what you are describing. At the end you can export to CSV as in the example workflow, or you can use an Excel Writer …



I would go with group loop and create files/folders variable node. But first have a look at gonhaddocks solution. maybe it already provides what you need.


Hello @Mariaper and @Daniel_Weikert

@Daniel_Weikert is right, because in fact it does exist as many solutions for this challenge as attempts to solve it :slight_smile:

[ … ]

In fact, I’ve just realize that challenge 02 already splits into sub-folders as well…



Thank you both for the responses! I will try with this !

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