<?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: Daily Load New Files only in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169072#M380257</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a little time this morning so let me whip up a test file for you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Aug 2016 06:19:31 GMT</pubDate>
    <dc:creator>adamdavi3s</dc:creator>
    <dc:date>2016-08-26T06:19:31Z</dc:date>
    <item>
      <title>Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169068#M380253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Source Folder: c:\sourcedata&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ServerLog20160801.txt&lt;/P&gt;&lt;P&gt;ServerLog20160605.txt&lt;/P&gt;&lt;P&gt;ServerLog20160307.txt&lt;/P&gt;&lt;P&gt;ServerLog20160713.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// New files will be added few times a week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I write script that allows me to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First Run:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;During first run loads all files that exist and create &lt;STRONG&gt;ServerLog_Full.qvd&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Create list of records of files processed in &lt;STRONG&gt;Processed_ServerLog_FilesList.qvd&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Daily Incremental Run:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;During daily run read new files that will come in, compare it with files already processed (&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Processed_ServerLog_FilesList.qvd) &lt;/STRONG&gt;&lt;/SPAN&gt; and concatenate new data only to ServerLog_Full.qvd also appends newly processed files list to Processed_ServerLog_FilesList.qvd&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 03:29:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169068#M380253</guid>
      <dc:creator />
      <dc:date>2016-08-25T03:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169069#M380254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of messing with figuring out which files are new, you could create a batch file that runs on successful completion of the load.&lt;/P&gt;&lt;P&gt;That batch file would move all files into a backup folder.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 12:25:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169069#M380254</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-08-25T12:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169070#M380255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;Something along the lines of this, sorry I've typed it on the fly so its likely to need some tweeking!&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14721300214322336 jive_text_macro" jivemacro_uid="_14721300214322336"&gt;
&lt;P style="font-size: 13.3333px;"&gt;//Check for the log qvd&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LET logqvdfile = '&lt;SPAN style="font-size: 13.3333px;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;:\Processed_ServerLog_FilesList.qvd';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LET &lt;SPAN style="font-size: 13.3333px;"&gt;baseQVDFileSize &lt;/SPAN&gt;= FileSize('$(log&lt;SPAN style="font-size: 13.3333px;"&gt;qvdfile &lt;/SPAN&gt;)');&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;IF&amp;nbsp; baseQVDFileSize &amp;gt; 0 THEN&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;log:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD filename, loaded&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;from [C&lt;SPAN style="font-size: 13.3333px;"&gt;:\Processed_ServerLog_FilesList.qvd] &lt;/SPAN&gt;(QVD);&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;ELSE&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;ENDIF&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;//check for the fact qvd&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LET factqvdfile = '&lt;SPAN style="font-size: 13.3333px;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ServerLog_Full.qvd&lt;/SPAN&gt;';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LET &lt;SPAN style="font-size: 13.3333px;"&gt;baseFactFileSize &lt;/SPAN&gt;= FileSize('$(fact&lt;SPAN style="font-size: 13.3333px;"&gt;qvdfile &lt;/SPAN&gt;)');&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;IF&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;baseFactFileSize &lt;/SPAN&gt;&amp;gt; 0 THEN&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;log:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD filename, loaded&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;from [C&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;ServerLog_Full.qvd&lt;/SPAN&gt;] &lt;/SPAN&gt;(QVD);&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;ELSE&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;ENDIF&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;//load in the new files files&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;for each File in filelist ('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;c:\sourcedata\&lt;/SPAN&gt;*.txt')&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;test:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD $(File) as filename&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;AUTOGENERATE 1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;WHERE NOT EXISTS filename;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;next File;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P&gt;LET CKNumRows=NoOfRows('&lt;SPAN style="font-size: 13.3333px;"&gt;test&lt;/SPAN&gt;');&lt;/P&gt;
&lt;P&gt;FOR p=1 to $(CKNumRows)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vFileChecker=Peek('filename',$(p),'&lt;SPAN style="font-size: 13.3333px;"&gt;test&lt;/SPAN&gt;'); &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;
&lt;P&gt;blah blah blah&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;NEXT p;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;concatenate(log)&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD filename, now() as loaded&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;resident test;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;store log into &lt;C&gt;;&lt;/C&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;store fact into &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;C&gt;;&lt;/C&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop table test;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop table log;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;drop table fact;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 12:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169070#M380255</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-08-25T12:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169071#M380256</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;Couple of questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is Fact: table in the script, what will itl load when we do a store.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;second. I am getting syntax error where it says WHERE NOT EXIST filename. What filename are we refering to here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-c" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;test:&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;LOAD $(File) as filename&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;AUTOGENERATE 1&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;WHERE NOT EXISTS filename;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;next File;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Aug 2016 17:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169071#M380256</guid>
      <dc:creator />
      <dc:date>2016-08-25T17:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169072#M380257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got a little time this morning so let me whip up a test file for you &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 06:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169072#M380257</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-08-26T06:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169073#M380258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry got waylay-ed.&lt;/P&gt;&lt;P&gt;I am sure someone could make this more efficient but this works:&lt;/P&gt;&lt;P&gt;Its a cool example for me to blog as well so thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Please remember to mark this as helpful or the correct answer if I have helped you or answered your question.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14721975731485826" jivemacro_uid="_14721975731485826"&gt;
&lt;P&gt;Let vFilePath='E:\';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//Check for the log qvd &lt;/P&gt;
&lt;P&gt;LET logqvdfile = '$(vFilePath)qvds\Processed_ServerLog_FilesList.qvd'; &lt;/P&gt;
&lt;P&gt;LET baseQVDFileSize = FileSize('$(logqvdfile)'); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IF&amp;nbsp; baseQVDFileSize &amp;gt; 0 THEN &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TRACE logfile found, loading it;&lt;/P&gt;
&lt;P&gt;log: &lt;/P&gt;
&lt;P&gt;LOAD filename, loaded &lt;/P&gt;
&lt;P&gt;from [$(vFilePath)qvds\Processed_ServerLog_FilesList.qvd] (QVD); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ELSE &lt;/P&gt;
&lt;P&gt;ENDIF &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;//check for the fact qvd &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET factqvdfile = '$(vFilePath)qvds\ServerLog_Full.qvd'; &lt;/P&gt;
&lt;P&gt;LET baseFactFileSize = FileSize('$(factqvdfile)'); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IF&amp;nbsp; baseFactFileSize &amp;gt; 0 THEN&amp;nbsp; //our fact QVD exists already so we are good to go&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TRACE factfile found, loading it;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; fact: &lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD filename,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [1],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [2],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [3]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; from [$(vFilePath)qvds\ServerLog_Full.qvd] (QVD); &lt;/P&gt;
&lt;P&gt;&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 ('$(vFilePath)sourcedata\*.txt') &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; test:&amp;nbsp; //preceeding load required for our not exists test&lt;/P&gt;
&lt;P&gt;&amp;nbsp; load filename&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WHERE NOT EXISTS(filename);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD '$(File)' as filename &lt;/P&gt;
&lt;P&gt;&amp;nbsp; AUTOGENERATE 1 &lt;/P&gt;
&lt;P&gt;&amp;nbsp; ; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; next File; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET CKNumRows=NoOfRows('test'); &lt;/P&gt;
&lt;P&gt;&amp;nbsp; FOR p=0 to $(CKNumRows)&amp;nbsp; -1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vFileChecker=Peek('filename',p,'test');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; fact: &lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD '$(vFileChecker)' as filename,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [1],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [2],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [3]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '$(vFileChecker)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (txt, codepage is 1252, embedded labels, delimiter is ',', msq); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NEXT p;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; concatenate(log) &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD filename, now() as loaded &lt;/P&gt;
&lt;P&gt;&amp;nbsp; resident test;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;drop table test; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ELSE //our fact QVD doesn't exist already so we can't check filename&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TRACE factfile not found so building it;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; for each File1 in filelist ('$(vFilePath)sourcedata\*.txt') &lt;/P&gt;
&lt;P&gt;&amp;nbsp; fact:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD '$(File1)' as filename, [1],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [2],&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [3]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;
&lt;P&gt;&amp;nbsp; '$(File1)'&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (txt, codepage is 1252, embedded labels, delimiter is ',', msq);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; NEXT File1&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TRACE logfile not found so building it;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; log: &lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD filename, now() as loaded &lt;/P&gt;
&lt;P&gt;&amp;nbsp; resident fact; &lt;/P&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;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ENDIF&lt;/P&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;
&lt;P&gt;store log into [$(vFilePath)qvds\Processed_ServerLog_FilesList.qvd]; &lt;/P&gt;
&lt;P&gt;store fact into&amp;nbsp; [$(vFilePath)qvds\ServerLog_Full.qvd]; &lt;/P&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;
&lt;P&gt;drop table log; &lt;/P&gt;
&lt;P&gt;drop table fact;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 07:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169073#M380258</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-08-26T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169074#M380259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not planning to have filename inside of my Fact.qvd. can we avoid this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2016 18:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169074#M380259</guid>
      <dc:creator />
      <dc:date>2016-08-26T18:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169075#M380260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you please provide bit of explaination on how this code works. Got lost mid way thru. thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 01:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169075#M380260</guid>
      <dc:creator />
      <dc:date>2016-09-06T01:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Daily Load New Files only</title>
      <link>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169076#M380261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hanns,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a few more comments on my blog so that might help but let me know which bit in particular you would want extra notes on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikanddirty.com/2016/08/26/loading-only-new-files-with-logfiles/" style="font-size: 10pt; line-height: 1.5em;" title="http://qlikanddirty.com/2016/08/26/loading-only-new-files-with-logfiles/"&gt;http://qlikanddirty.com/2016/08/26/loading-only-new-files-with-logfiles/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There could be a way to work it without the filename but it is always handy for auditing as well. Obviously you don't have to load all fields from a QVD so the only harm in having it is storage space&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:39:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Daily-Load-New-Files-only/m-p/1169076#M380261</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-09-13T06:39:57Z</dc:date>
    </item>
  </channel>
</rss>

