<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Test the file existence in a multi source load thanks to filesize() in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003929#M1472</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After severals minutes navigating the forum to find the answer of the problem I've met, I decided to ask for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I met some difficulties to load in Qlik Sense all the files contained in a folder thanks to 'Filesize' function.&lt;/P&gt;&lt;P&gt;So, I tried to test the file existence in a loop durinq the loading script like below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;These files names are like (file1.xlsm, file2.xlsm,...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;set a = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Do while a&amp;lt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Let taille = FileSize ('\\folder\file$(a).xlsm');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;If taille &amp;lt;&amp;gt;0 then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;[BDD]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;FROM [lib://folder/&lt;SPAN style="font-size: 13.3333px;"&gt;file$(a).xlsm&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;(ooxml, embedded labels, table is BDD);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Let a=a+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the debug mod, the var 'taille' does not return the size of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that I'm clear in my explanation.&lt;/P&gt;&lt;P&gt;Thanks for you help&lt;/P&gt;&lt;P&gt;(Sorry for my english) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Nov 2015 15:45:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-16T15:45:02Z</dc:date>
    <item>
      <title>Test the file existence in a multi source load thanks to filesize()</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003929#M1472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After severals minutes navigating the forum to find the answer of the problem I've met, I decided to ask for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I met some difficulties to load in Qlik Sense all the files contained in a folder thanks to 'Filesize' function.&lt;/P&gt;&lt;P&gt;So, I tried to test the file existence in a loop durinq the loading script like below:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;These files names are like (file1.xlsm, file2.xlsm,...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;set a = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Do while a&amp;lt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Let taille = FileSize ('\\folder\file$(a).xlsm');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;If taille &amp;lt;&amp;gt;0 then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;[BDD]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;...&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;FROM [lib://folder/&lt;SPAN style="font-size: 13.3333px;"&gt;file$(a).xlsm&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;(ooxml, embedded labels, table is BDD);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Let a=a+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;Loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the debug mod, the var 'taille' does not return the size of the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that I'm clear in my explanation.&lt;/P&gt;&lt;P&gt;Thanks for you help&lt;/P&gt;&lt;P&gt;(Sorry for my english) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Nov 2015 15:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003929#M1472</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-16T15:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Test the file existence in a multi source load thanks to filesize()</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003930#M1473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The FileSize function also needs to use a lib reference. Unless you enable the legacy script mode. See the help file: &lt;A href="http://help.qlik.com/sense/2.1/en-US/online/#../Subsystems/Hub/Content/Scripting/FileFunctions/FileSize.htm" title="http://help.qlik.com/sense/2.1/en-US/online/#../Subsystems/Hub/Content/Scripting/FileFunctions/FileSize.htm"&gt;http://help.qlik.com/sense/2.1/en-US/online/#../Subsystems/Hub/Content/Scripting/FileFunctions/FileSize.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But why not use a wildcard load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;BDD:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;LOAD&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;... &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;FROM [lib://folder/&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;file*.xlsm&lt;/SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #0000ff;"&gt;(ooxml, embedded labels, table is BDD);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 06:31:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003930#M1473</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-11-17T06:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Test the file existence in a multi source load thanks to filesize()</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003931#M1474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I don't know why I did not think about this easier solution before!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, thanks for this information and your quick answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 10:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Test-the-file-existence-in-a-multi-source-load-thanks-to/m-p/1003931#M1474</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-20T10:53:47Z</dc:date>
    </item>
  </channel>
</rss>

