Creating Path to different folders

Can anyone help with this request:

I would like to read all excel files in subfolders that have the same name within folders that have different names.

For example I have folders based on countries:

  • FRANCE
  • ITALY
  • GERMANY

And within each of the mentioned above I have subfolders with a specified FY:

  • 2122
  • 2223
  • 2324

I would now like my workflow to automatically read and combine all excel files „2324“ since they have the same format.

What‘s the best way to do this?

Hello @juutzii,

and welcome to KNIME Community!

Excel Reader node can read multiple files and combine (concatenate) them so for each format you’ll need one reader node. To configure it properly use option Files in folder, choose countries parent folder and then in Filter option use filtering based on folder name. Make sure to click Include subfolders checkbox.

Hope this helps!

Br,
Ivan

Thanks for the fast reply - that‘s what I tried initially. But I have many countries and ideally don‘t want to create as many nodes.

There is no way around this?

Hello @juutzii,

this approach is not country dependent but rather subfolder (2122, 2223, 2324) dependent as you need to have one Excel Reader for each format you have.

Anyways if you have many formats use List Files/Folders node to list them all and then you can loop over it one by one to avoid having multiple Excel Reader nodes. You can use Table Row to Variable Loop Start and then use flow variable to control Excel Reader filtering folder option. Requires a bit of work (dependent on your knowledge) but it’s doable. Additionally keep in mind that workflow logic and design hugely depends on what you want to do with data once you have it in KNIME…

I’m using version 4.7.x. Not sure if node names and functionalities are same in higher versions.

Br,
Ivan