12 Replies Latest reply: Aug 4, 2017 11:20 AM by Andrea Ghirardello RSS

    Get a list of files

    anna gordon

      Hello! So I want  to get all the files from a directory in Qlik Sense Desktop.


      Found a nice post on the forum


      Set vConcatenate = ;



      '' AS SourceFile


      sub ScanFolder(Root)

                for each FileExtension in 'qvw'

                          for each FoundFile in filelist(Root & '\*.' & FileExtension)


                                    LOAD '$(FoundFile)' as SourceFile

             AUTOGENERATE 1;


                                    Set vConcatenate = Concatenate;

                          next FoundFile

                next FileExtension

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

                          call ScanFolder(SubDirectory)

                next SubDirectory

      end sub


      Call ScanFolder('C:\Users\Public\Pictures\Sample Pictures\') ;

      But It's not working. The FoundFile variable is always null. I've tried with different methods and I get Null every time.


      There is another example on this page Attribute ‒ Qlik Sense

      But those are not working either.

      What is wrong?