Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Colleagues,
I'm looking for some solution to ready multiple folders as data source (txt or excel)
Basically I need to create a load statement where I ready from all the folders below?
Folder 1\SubFolder 1
Folder 1\SubFolder 2
Folder 1\SubFolder 3
inside the folder I have a generif file name it means I should read all files with .xls extension
Thanks in advance,
Leandro Duarte
Hi.
Look at help, 'foreach' statement. There is an example.
Hi Leandro,
take a look at below script, this might help you.
SUB doDir (dir)
FOR EACH file in filelist('$(dir)' & '\*.qvw')
files:
LOAD
x,
y
from xyz;
NEXT
FOR EACH subdir in dirlist( '$(dir)' & '\*' )
CALL doDir('$(subdir)')
NEXT
END SUB
FOR EACH subdir in dirlist( '.' & '\*' )
CALL doDir('$(subdir)')
NEXT
Regards,
Gaurav