<?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: search inside folders for file load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523417#M687599</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one thing to clear up.&lt;/P&gt;&lt;P&gt;I need separate concatenated table for each table_name. (to concatenate it to existing qvd)&lt;/P&gt;&lt;P&gt;do I need to write this script for each different table_name? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Dec 2013 14:39:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-24T14:39:46Z</dc:date>
    <item>
      <title>search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523409#M687591</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 need to load files from sub folders of sub folders.&lt;/P&gt;&lt;P&gt;I have the syntax for the regular search:&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; list-style-position: initial; list-style-image: initial; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; each SubDirectory &lt;/SPAN&gt;&lt;SPAN class="op" style="font-weight: inherit; font-style: inherit; color: #808080; background-color: inherit; font-size: 9pt !important;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; dirlist( Root &amp;amp; &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'\*'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; )&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(substringcount(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'$(SubDirectory)'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'@'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;, &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; background-color: inherit; font-size: 9pt !important;"&gt;'$(vRunList)'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;) &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ScanFolder(SubDirectory)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; if&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; background-color: inherit; font-size: 9pt !important;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; background-color: inherit; font-size: 9pt !important;"&gt;next&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; background-color: inherit; font-size: 9pt !important;"&gt; SubDirectory&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;but the files aren't in the SubDirectory - they are in the sub directories of it (multiple directories).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;in each sub-sub directory I have files with the same name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;I need to load all this files and concatenate them into one table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;can somebody help me with the script syntax?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt !important; font-style: inherit; background-color: inherit; font-weight: inherit;"&gt;Boris&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523409#M687591</guid>
      <dc:creator />
      <dc:date>2013-12-24T12:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523410#M687592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe like this:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/thread/90031"&gt;http://community.qlik.com/thread/90031&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using a recursive call to DoDir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:21:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523410#M687592</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-12-24T12:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523411#M687593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try moving the if clause up a bit:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13878886591618689" jivemacro_uid="_13878886591618689" modifiedtitle="true"&gt;
&lt;P&gt;Set vConcatenate = ;&lt;/P&gt;
&lt;P&gt;sub ScanFolder(Root)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(substringcount(Root &amp;amp; '@', '$(vRunList)') then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each FileExtension in 'csv'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each FoundFile in filelist( Root &amp;amp; '\*.' &amp;amp; FileExtension)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileList:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vConcatenate)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *, '$(FoundFile)' as SourceFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [$(FoundFile)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 2 lines);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vConcatenate = Concatenate;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next FoundFile&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next FileExtension&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each SubDirectory in dirlist( Root &amp;amp; '\*' )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ScanFolder(SubDirectory)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next SubDirectory&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;



&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523411#M687593</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-24T12:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523412#M687594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when the if is outside the loop then the Sub directory is irrelevant because the whole purpose is to &lt;/P&gt;&lt;P&gt;scan the sub folders by their names the the vRunList.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example for the directories:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d:/temp/#run_id/#part_id/table_name_X.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_c.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vRunList is all the run_id's I need in this load.&lt;/P&gt;&lt;P&gt;the part_id I need all of them each load for each run_id.&lt;/P&gt;&lt;P&gt;also, for each table_name I need a different QVD( concatenated for all sub folders) because after I load all necessary files I concatenate each one to an existing QVD of this table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523412#M687594</guid>
      <dc:creator />
      <dc:date>2013-12-24T12:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523413#M687595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;when the if is outside the loop then the Sub directory is irrelevant because the whole purpose is to &lt;/P&gt;&lt;P&gt;scan the sub folders by their names the the vRunList.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an example for the directories:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d:/temp/#run_id/#part_id/table_name_X.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/1/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/1/2/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/1/table_name_c.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_a.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_b.csv&lt;/P&gt;&lt;P&gt;d:/temp/2/2/table_name_c.csv&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vRunList is all the run_id's I need in this load.&lt;/P&gt;&lt;P&gt;the part_id I need all of them each load for each run_id.&lt;/P&gt;&lt;P&gt;also, for each table_name I need a different QVD( concatenated for all sub folders) because after I load all necessary files I concatenate each one to an existing QVD of this table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 12:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523413#M687595</guid>
      <dc:creator />
      <dc:date>2013-12-24T12:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523414#M687596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you can parse the filename then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each FoundFile in filelist( Root &amp;amp; '\*.' &amp;amp; FileExtension)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt; if( match(subfield(filename('$(FoundFile)'),'\',3) &amp;amp; '@', '$(vRunList)') then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileList:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vConcatenate)&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *, '$(FoundFile)' as SourceFile&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [$(FoundFile)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 2 lines);&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vConcatenate = Concatenate;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; end if&lt;/P&gt;&lt;P&gt;next FoundFile &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 13:11:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523414#M687596</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-24T13:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523415#M687597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where in this script I have the loop on the #part_id?&lt;/P&gt;&lt;P&gt;I understood that the root is the d:\temp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need for all Relevant run_id's (vRunList) to go to all part_id's and concatenate each table_name to it's matching table names in all other part_id's.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I having difficulty to understand in this script I know that it is the same table and when do I go through all part_id's.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 14:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523415#M687597</guid>
      <dc:creator />
      <dc:date>2013-12-24T14:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523416#M687598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't loop on part_id or run_id. It will scan all sub directories and loop through all files. It checks each file name (which includes the file path) to see if the number after the second backslash is a number from your run list. If it does the file is loaded, if not it is skipped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1387895796228873" jivemacro_uid="_1387895796228873" modifiedtitle="true"&gt;
&lt;P&gt;Set vConcatenate = ;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;sub ScanFolder(Root)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each FileExtension in 'csv'&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each FoundFile in filelist( Root &amp;amp; '\*.' &amp;amp; FileExtension)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( match(subfield(filename('$(FoundFile)'),'\',3) &amp;amp; '@', '$(vRunList)') then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FileList:&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vConcatenate)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *, '$(FoundFile)' as SourceFile&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM [$(FoundFile)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq, header is 2 lines);&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set vConcatenate = Concatenate;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; next FoundFile&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next FileExtension&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each SubDirectory in dirlist( Root &amp;amp; '\*' )&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call ScanFolder(SubDirectory)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next SubDirectory&amp;nbsp; &lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 14:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523416#M687598</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-24T14:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523417#M687599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;one thing to clear up.&lt;/P&gt;&lt;P&gt;I need separate concatenated table for each table_name. (to concatenate it to existing qvd)&lt;/P&gt;&lt;P&gt;do I need to write this script for each different table_name? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 14:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523417#M687599</guid>
      <dc:creator />
      <dc:date>2013-12-24T14:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523418#M687600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming all your CSV files are of same format, you could use the below code. It will automatically concatenate the data to the table Table_Name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please change the load statement accordingly (txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ZLoadDirectory = 'd:/temp/';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB LoadDirectory (ZLoadDirectory)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FOR each File in filelist (ZLoadDirectory &amp;amp; '\*.csv')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Table_Name:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; *&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [$(File)] (txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //This will make the code to go over all the subdirectories&lt;/P&gt;&lt;P&gt;&amp;nbsp; FOR each Dir in dirlist (ZLoadDirectory&amp;amp;'\*')&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL LoadDirectory(Dir)&lt;/P&gt;&lt;P&gt;&amp;nbsp; NEXT Dir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Load all the files in the directory&lt;/P&gt;&lt;P&gt;CALL LoadDirectory (ZLoadDirectory) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 14:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523418#M687600</guid>
      <dc:creator />
      <dc:date>2013-12-24T14:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523419#M687601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could add a parameter to the sub function for the table name so it will take two arguments: a start directory and a name for the table that will be created.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2013 14:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523419#M687601</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-12-24T14:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523420#M687602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Hi,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Try This:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB DoDir (Root)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR each File in filelist(Root&amp;amp; '\*.xls')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raw_Data_New:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;FROM [$(File)] &lt;/P&gt;&lt;P&gt;(biff, no labels, table is Sheet1$)&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR each Dir in dirlist (Root&amp;amp;'\*')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL DoDir(Dir)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT Dir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END SUB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL DoDir('C:\Users\AGoel\Desktop\Shared Apps\Voter List\ERoll')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Raw_Data_New into Raw_Data_New.qvd;&lt;/P&gt;&lt;P&gt;DROP table Raw_Data_New;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Dec 2013 03:16:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523420#M687602</guid>
      <dc:creator />
      <dc:date>2013-12-27T03:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523421#M687603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, Just to understand.&lt;/P&gt;&lt;P&gt;This is my Path: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;d:/temp/#run_id/#part_id/table_name_X.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root = d:/temp&lt;/P&gt;&lt;P&gt;my run_id is the Dir in Dir List, am I right?&lt;/P&gt;&lt;P&gt;and the part_id is transparent, it will load all files in the run_id directory?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Now,&amp;nbsp; one last issue, the table names in each part id are the same, I need to concatenate all the tables with same name. as I understand this script, it will create multiple tables, and because we have same named files it will&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;overwrite the tables, how can I overcome this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks a lot!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Boris &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 11:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523421#M687603</guid>
      <dc:creator />
      <dc:date>2013-12-31T11:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523422#M687604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but the file name should be the same as the parameter I will pass.&lt;/P&gt;&lt;P&gt;how can I check it during the loop?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2013 12:34:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523422#M687604</guid>
      <dc:creator />
      <dc:date>2013-12-31T12:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: search inside folders for file load</title>
      <link>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523423#M687607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;filename doesn't work in regular script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/search-inside-folders-for-file-load/m-p/523423#M687607</guid>
      <dc:creator />
      <dc:date>2014-01-02T09:50:00Z</dc:date>
    </item>
  </channel>
</rss>

