Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

for each file in filelist

what does it mean " for each file in filelist" ? does it mean for each raw  of table in an excel file or for each tab? Thank you so much in advance.

2 Replies

for each file in filelist

I believe neither one.

It will actually iterate over files given in filelist, for example each excel file in a folder.

See this example from HELP:

// list all QV related files on disk

sub DoDir (Root)

for each Ext in 'qvw', 'qva', 'qvo', 'qvs'

for each File in filelist (Root&' \*.' &Ext)

Load '$(File)' as Name, FileSize( '$(File)' ) as

Size, FileTime( '$(File)' ) as FileTime

autogenerate 1;

next File

next Ext

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

call DoDir (Dir)

next Dir

end sub

call DoDir ('C:')

Hope this helps,


Contributor II

Re: for each file in filelist

Hi Swuehl,

We are also using the similar code in one our application. But the issue with the above code is, it is generating huge log files(Log file is bigger than the application). If you can advice on how to optimize this code it would be really great. Please respond back in your convenient time.


Community Browser