<?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 loading multiple files in a directory in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338199#M124696</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can you try this:&lt;/P&gt;&lt;P&gt;i feel that you should close the loop before the inner join..... &lt;/P&gt;&lt;P&gt;Not sure though. you can give it a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;SET dir="D:\";&lt;BR /&gt;LET prevProcessTime=Timestamp(now()-makeTime(00,15,00));&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;for each file in filelist(dir&amp;amp;'gtp_start_loc*.csv')&lt;BR /&gt;LET fileCreationTime=filetime('$(file)');&lt;BR /&gt;if fileCreationTime&amp;gt;prevProcessTime then&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;tempTable:&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD gtp:start_time, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:usi, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:msisdn as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;$(file)&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;next file&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;BR /&gt;inner join&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD Service, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65&amp;amp;[Service Number] as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;D:\crm.csv&lt;BR /&gt;(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 style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;store tempTable into abc.csv(txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Robinson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 May 2012 04:22:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-07T04:22:18Z</dc:date>
    <item>
      <title>loading multiple files in a directory</title>
      <link>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338198#M124695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm trying to load multiple files from a directory which is created in the last 15 minutes. Each time i load a file, I inner join it to another file. At the end of the loop I wanted to store the whole table into a text file. The problem i am facing is that every time the script loops through a file, a new table is created.(ie a table named tempTable is created in the first loop, tempTable-1 is created in the second loop, and tempTable3 is created in the third loop) Is there a way to load them into the same table since all of them have the same fiels. My code is as below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET dir="D:\";&lt;BR /&gt;LET prevProcessTime=Timestamp(now()-makeTime(00,15,00));&lt;/P&gt;&lt;P&gt;for each file in filelist(dir&amp;amp;'gtp_start_loc*.csv')&lt;BR /&gt;LET fileCreationTime=filetime('$(file)');&lt;BR /&gt;if fileCreationTime&amp;gt;prevProcessTime then&lt;/P&gt;&lt;P&gt;tempTable:&lt;/P&gt;&lt;P&gt;LOAD gtp:start_time, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:usi, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:msisdn as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;$(file)&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;inner join&lt;/P&gt;&lt;P&gt;LOAD Service, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65&amp;amp;[Service Number] as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;D:\crm.csv&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;BR /&gt;endif&lt;BR /&gt;next file&lt;/P&gt;&lt;P&gt;store tempTable into abc.csv(txt);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 04:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338198#M124695</guid>
      <dc:creator />
      <dc:date>2012-05-07T04:11:04Z</dc:date>
    </item>
    <item>
      <title>loading multiple files in a directory</title>
      <link>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338199#M124696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please can you try this:&lt;/P&gt;&lt;P&gt;i feel that you should close the loop before the inner join..... &lt;/P&gt;&lt;P&gt;Not sure though. you can give it a try.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;SET dir="D:\";&lt;BR /&gt;LET prevProcessTime=Timestamp(now()-makeTime(00,15,00));&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;for each file in filelist(dir&amp;amp;'gtp_start_loc*.csv')&lt;BR /&gt;LET fileCreationTime=filetime('$(file)');&lt;BR /&gt;if fileCreationTime&amp;gt;prevProcessTime then&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;tempTable:&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD gtp:start_time, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:usi, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gtp:msisdn as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;$(file)&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;endif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;next file&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;&lt;BR /&gt;inner join&lt;/P&gt;&lt;P style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;LOAD Service, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65&amp;amp;[Service Number] as key, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;D:\crm.csv&lt;BR /&gt;(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 style="background-color: #eef4f9; font-size: 12px; color: #636363; font-family: Arial;"&gt;store tempTable into abc.csv(txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Robinson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 04:22:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338199#M124696</guid>
      <dc:creator />
      <dc:date>2012-05-07T04:22:18Z</dc:date>
    </item>
    <item>
      <title>loading multiple files in a directory</title>
      <link>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338200#M124697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robinson, it work:)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 04:25:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338200#M124697</guid>
      <dc:creator />
      <dc:date>2012-05-07T04:25:20Z</dc:date>
    </item>
    <item>
      <title>loading multiple files in a directory</title>
      <link>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338201#M124698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gr8,.. U R Most Welcome&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THanks,&lt;/P&gt;&lt;P&gt;Robinson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2012 13:38:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loading-multiple-files-in-a-directory/m-p/338201#M124698</guid>
      <dc:creator />
      <dc:date>2012-05-07T13:38:27Z</dc:date>
    </item>
  </channel>
</rss>

