Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning all,
I am trying to create some script that allows me to extract a list of all the .qvw files that are on our production file path, and so far I have been using the following.
Set vConcatenate = ;
sub ScanFolderProd(Root)
for each FileExtension in 'qvw'
for each FoundFile in filelist( Root & '\*.' & FileExtension)
Files:
LOAD lower(mid('$(FoundFile)',index('$(FoundFile)','\',-1)+1,len('$(FoundFile)'))) as SourceFile
, Filesize('$(FoundFile)') as Size
, FileTime('$(FoundFile)') as Last_Modified
, 'Production' as Status
AUTOGENERATE 1;
Set vConcatenate = Concatenate;
next FoundFile
next FileExtension
for each SubDirectory in dirlist( Root & '\*' )
call ScanFolderProd(SubDirectory)
next SubDirectory
end sub
Call ScanFolderProd('\\filepath') ;
What I am after, is a way of also extracting the attributes (as specified in the QMC), we have assigned each document a developer, department and business owner, and to get this as well as the list of .qvw files would be a great help.
Thanks!
Jon
Check out the following Design Blog, pretty much what you are trying to do I believe:
https://community.qlik.com/t5/Qlik-Design-Blog/Loops-in-the-Script/ba-p/1473543
Regards,
Brett