<?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 Re: multiple files load from multiple folders in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520053#M687769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how does Scan folder works? where can I find documentation about it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Dec 2013 15:14:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-23T15:14:21Z</dc:date>
    <item>
      <title>multiple files load from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520050#M687766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm building an extract script for my app - the source Data is CSV files from a certain path in the system.&lt;/P&gt;&lt;P&gt;For each run of the system a new folder is created, in this folder there are 6-7 files, each representing a different table.&lt;/P&gt;&lt;P&gt;the folder name is the RUN_ID of this run.&lt;/P&gt;&lt;P&gt;the meta data of the run is an analytics table - in it I have all RUN_ID's and run dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to load files into existing QVDs. the high level algorithm for the load is known.&lt;/P&gt;&lt;P&gt;What I need is a way to know from the analytics table, which Runs do I need to load from the file system.&lt;/P&gt;&lt;P&gt;then, I need to loop through the root folder but only through the RUN_ID folders who are relevant for this load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) How is the save of a list of needed RUN_IDs is made? (the watermark should be date or run_id)&lt;/P&gt;&lt;P&gt;2) How is a loop through a root folder is made when we need to check the sub folders (the RUN_IDs) and stop when we finish with the list&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; we got from the first question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 09:42:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520050#M687766</guid>
      <dc:creator />
      <dc:date>2013-12-23T09:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files load from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520051#M687767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. If you have a table with records for the RUN_IDs then you can create a variable with a list of those IDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_13878145947794243 jive_macro_code" jivemacro_uid="_13878145947794243"&gt;
&lt;P&gt;Temp:&lt;/P&gt;
&lt;P&gt;Load concat(RUN_ID &amp;amp; '@',',') as RunList&lt;/P&gt;
&lt;P&gt;from analytics_table;&lt;/P&gt;
&lt;P&gt;LET vRunList = peek('RunList');&lt;/P&gt;
&lt;P&gt;Drop table Temp;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. See this discussion: &lt;A href="https://community.qlik.com/thread/62449"&gt;loop through to load all files from a folder and its subfolders?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the loop you check if the folder name is in the list of RUN_IDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13878145946852987" jivemacro_uid="_13878145946852987" modifiedtitle="true"&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;for each SubDirectory in dirlist( Root &amp;amp; '\*' )&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(substringcount('$(SubDirectory)' &amp;amp; '@', '$(vRunList)') then&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ScanFolder(SubDirectory)&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;next SubDirectory&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 10:07:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520051#M687767</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-23T10:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files load from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520052#M687768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Borris,&lt;/P&gt;&lt;P&gt;Sorry am not clear with your requirement.&lt;/P&gt;&lt;P&gt;I have attached an example that fetches files from different folders as they are listed in a master file.&lt;/P&gt;&lt;P&gt;Can u please explain your requirement?&lt;/P&gt;&lt;P&gt;-Sundar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 10:07:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520052#M687768</guid>
      <dc:creator>sundarakumar</dc:creator>
      <dc:date>2013-12-23T10:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: multiple files load from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520053#M687769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how does Scan folder works? where can I find documentation about it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Dec 2013 15:14:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/multiple-files-load-from-multiple-folders/m-p/520053#M687769</guid>
      <dc:creator />
      <dc:date>2013-12-23T15:14:21Z</dc:date>
    </item>
  </channel>
</rss>

