Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts,
Can someone explain me haw these functions work and what is their syntax? I am really confused how to use them, I looked at the reference manual and I tried something like this:
For each Ext in FileList('C:\Users\Gabika\Desktop\*.x*')
Main:
LOAD
'$(vFile)' as File
AutoGenerate (1);
Whatever I tried write in bracket, the result is still: c:\Program Files\QlikView\Themes\Wind.qvt
Thank you for your answer.
Root is just a parameter of such sub, which defines where your search will start from. When you invoke this sub, you use C:\ as root, which means you will search those files from C:\ and its sub-folders.
Find example from ref. manual.
// example 2 - list all QV related files on disk
sub DoDir (Root)
for each Ext in 'qvw','qvo','qvs','qvt','qvd'
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:')
Vikas
I looked at it, but I do not understand it. I need to explain it. Mainly I do not understand syntax in bracket.
Hi,
First we define the extensions we want to look for for each Ext in 'qvw','qvo','qvs','qvt','qvd'
Then we define the directory we want to search, in this case (Root& and then we look for anything with one of the predefined extensions (see above) '\*.'&Ext)
So in this case we would search the computer for anything with these extensions 'qvw','qvo','qvs','qvt','qvd'
What does root mean? Where is it define?
Can someone explain me it ?
Thanks
Maybe this:
For each Ext in FileList('C:\Users\Gabika\Desktop\*.x*')
Main:
LOAD
'$(Ext)' as File
AutoGenerate (1);
Root is just a parameter of such sub, which defines where your search will start from. When you invoke this sub, you use C:\ as root, which means you will search those files from C:\ and its sub-folders.
Hi.
My need is to read directories. I don't care a bout files this time.
Is there a DirName() function or something?
Do I have to pick up the DirName from NameFiles?
What if there is a DirName() empty?
Thanks
Does anyone know a good source to learn Looping & how to use Qlik's Listing Functions. Thanks