Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
lmonincx
Creator II
Creator II

for each : how to load same file name out of different set of folders

Hi,

I am looking for a way to load cerveral abc.csv which are stored in different folders.

example

D:\Datasource\Store\A\abc.csv

D:\Datasource\Store\B\abc.csv

D:\Datasource\Store\C\abc.csv

etc.

so i only want to search in the root D:\Datasource\Store\*

how do i build a for each in an for each ?

Help is appreciated.

Many thanks!

Linda

2 Replies
Not applicable

Hi Linda,

Have you looked at this post, as it got the same question, Loop through root directory (including subfolders) and list filenames of *.csv

Let us know if that solves your problem or if you need more help.

Good luck!

/Hampus

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

for each SubDirectory in dirlist( Root & '\*' )

        FileList:

            Load

               *

            FROM [$(SubDirectory) & '\abc.csv'] (txt);  

next SubDirectory

Hope this helps you.

Regards,

Jagan.