Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reading multiple files from a directory

Hi,

I want to make a Qlickview script to read multiples files from a diirectory.

I want to know if it is posible to do something like that:

1) execute comand in S.O. win from Qlick to get the files contanined in a directory (dir) -> load the filenames in a resident table

2) read this resident table row a row and for each filename make a load (load * from filename)

Thanks in advance,

3 Replies
Clever_Anjos
Employee
Employee

Why don´t you use the usual

for Each file in FileList('Path\*.qvd')

  LOAD *

  FROM [$(file)](qvd(;

next

maxgro
MVP
MVP

I think this is what you want but in a easier way


FOR Each File in filelist ('.\*.log' )          // or *.*

  trace read $(File);

  Table_$(File):

  LOAD *

  FROM

  '$(File)'

  (txt, unicode, no labels, delimiter is '\t', msq);

NEXT File;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Or just use a wildcard:

LOAD * FROM *.csv;