Reading csv files from multiple folders in a loop

Hi Guys!

I have multiple different subfolders which all contain at least one csv file. I would want to read all the csv files from the folders with a loop and then add the folder name as a constant value.

Please see picture of folder structure for clarification
image

Any help would be much appreciated!

Ilkka

Is there only one file in each folder?
Do you have a set list of files that doesn’t change?
Do you have a set list of folders that doesn’t change?
Do the parent folders change? Is there anything else inside them?


look at this image

1 Like

Is there only one file in each folder? Yes
Do you have a set list of files that doesn’t change? I will be updating the files from time to time but there will only be one file per folder
Do you have a set list of folders that doesn’t change? I will be adding up more folders going forward
Do the parent folders change? Is there anything else inside them? Parent folders won’t change and there is nothing else inside them

Thanks, do you know how can I add the filename as constant value column?

Captura de pantalla 2021-07-09 111029

I meant like this, so that I can add the name of the folder to data e.g. “Folder 1”

look

Captura de pantalla 2021-07-09 114504

1 Like

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