2 Replies Latest reply: Nov 20, 2015 5:53 AM by Rémi Gosset RSS

    Test the file existence in a multi source load thanks to filesize()

    Rémi Gosset

      Hey!

       

      After severals minutes navigating the forum to find the answer of the problem I've met, I decided to ask for help.

       

      I met some difficulties to load in Qlik Sense all the files contained in a folder thanks to 'Filesize' function.

      So, I tried to test the file existence in a loop durinq the loading script like below:

      These files names are like (file1.xlsm, file2.xlsm,...)

       

      set a = 1;

      Do while a<10

       

      Let taille = FileSize ('\\folder\file$(a).xlsm');

      If taille <>0 then

       

      [BDD]:

      LOAD

      ... 

      FROM [lib://folder/file$(a).xlsm]

      (ooxml, embedded labels, table is BDD);

       

      endif

      Let a=a+1;

      Loop

       

      But in the debug mod, the var 'taille' does not return the size of the file.

       

      I hope that I'm clear in my explanation.

      Thanks for you help

      (Sorry for my english)