<?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 How to skip files? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395645#M423704</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created somewhat of a logic to my QlikView application, where I have stored the filenames on a text file that has been already read.&lt;/P&gt;&lt;P&gt;And then on the editor script, I just check if that has already been on the list. But the load always still tries to "read" the file and shows the file name on the load screen and shows just that it does not load any rows from it. So actually it does not skip it on the way I would like, this current way takes too much time on my mind. I would not like to have it even opening the file at all, just skip it right away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;script:&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;// Find files that has already read&lt;/P&gt;&lt;P&gt;distinctFileNames:&lt;/P&gt;&lt;P&gt;load distinct filenameOfFile as fof from \\blaablaa\blaa.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Load files that are new and not already read and stored to QVD&lt;/P&gt;&lt;P&gt;for each file in filelist('\\blaablaa\blaablaablaa_*.csv')&lt;/P&gt;&lt;P&gt;if filesize(file) &amp;gt; 0 then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;FileName() as filenameOfFile,&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;$(file)&lt;/P&gt;&lt;P&gt;(txt, utf8, embedded labels, delimiter is ',', msq)&lt;/P&gt;&lt;P&gt;where not EXISTS(fof,FileName())&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas that would be better, than the WHERE NOT EXISTS part so that the load would not even check the file..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Niko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2017 06:25:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-12T06:25:44Z</dc:date>
    <item>
      <title>How to skip files?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395645#M423704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created somewhat of a logic to my QlikView application, where I have stored the filenames on a text file that has been already read.&lt;/P&gt;&lt;P&gt;And then on the editor script, I just check if that has already been on the list. But the load always still tries to "read" the file and shows the file name on the load screen and shows just that it does not load any rows from it. So actually it does not skip it on the way I would like, this current way takes too much time on my mind. I would not like to have it even opening the file at all, just skip it right away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;script:&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;// Find files that has already read&lt;/P&gt;&lt;P&gt;distinctFileNames:&lt;/P&gt;&lt;P&gt;load distinct filenameOfFile as fof from \\blaablaa\blaa.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Load files that are new and not already read and stored to QVD&lt;/P&gt;&lt;P&gt;for each file in filelist('\\blaablaa\blaablaablaa_*.csv')&lt;/P&gt;&lt;P&gt;if filesize(file) &amp;gt; 0 then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;FileName() as filenameOfFile,&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;$(file)&lt;/P&gt;&lt;P&gt;(txt, utf8, embedded labels, delimiter is ',', msq)&lt;/P&gt;&lt;P&gt;where not EXISTS(fof,FileName())&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;endif&lt;/P&gt;&lt;P&gt;NEXT;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas that would be better, than the WHERE NOT EXISTS part so that the load would not even check the file..?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Niko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 06:25:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395645#M423704</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-12T06:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip files?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395646#M423705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to open the files, just check the results from FILELIST.&lt;/P&gt;&lt;P&gt;aircode might be:&lt;/P&gt;&lt;P&gt;ExistingFiles: LOAD FileName FROM Files.QVD;&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; // List of already digested files&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH sFile IN FILELIST('....')&lt;/P&gt;&lt;P&gt;NewFiles:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '$(sFile)'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS NewFileName&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;NOT EXISTS(FileName, '$(sFile)';&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 only the not-existing files&lt;/P&gt;&lt;P&gt;NEXT sFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewData:&lt;/P&gt;&lt;P&gt;FOR i = 0 TO NOOFROWS('NewFiles')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // go through the list of new files, one-by-one&lt;/P&gt;&lt;P&gt;LET sNewFile = PEEK ('NewFileName', 0, 'NewFiles')&lt;/P&gt;&lt;P&gt;LOAD * FROM $(sNewFile);&lt;/P&gt;&lt;P&gt;CONCATENATE (ExistingFiles) LOAD '$(sNewFile)' AS FileName AUTOGENERATE 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // add to existing list&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE ExistingFiles INTO Files.QVD;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // overwrite&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2017 07:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395646#M423705</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2017-09-12T07:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to skip files?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395647#M423706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Peter!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And thank you for your help, this idea did help me to get my solution to work.&lt;/P&gt;&lt;P&gt;Had to do some external job but when I did get all in place, it did do the job as I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the idea-sharing help, much appreciated! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cool.png" /&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;Cheers,&lt;/P&gt;&lt;P&gt;Niko&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Sep 2017 10:44:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-skip-files/m-p/1395647#M423706</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-19T10:44:21Z</dc:date>
    </item>
  </channel>
</rss>

