<?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 read all the files using file time in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-read-all-the-files-using-file-time/m-p/662272#M668502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to load files only which are updated in this month using the code&lt;/P&gt;&lt;P&gt;DirectoriesToScan:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Dirspec&lt;BR /&gt;D:\Project LAC Reconciliation UI\Data\OGIS&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SUB doDir (dir)&lt;BR /&gt;&amp;nbsp; FOR EACH file in filelist('$(dir)' &amp;amp;&amp;nbsp; '\*.txt')&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Files:&lt;BR /&gt;&amp;nbsp; LOAD &lt;BR /&gt;&amp;nbsp; '$(file)' as FilePath,&lt;BR /&gt; FileSize('$(file)') as FileSize,&lt;BR /&gt; FileTime('$(file)') as FileTime,&lt;BR /&gt; if(FileTime( '$(file)' ) &amp;gt;= MonthStart(Today()), 1,'0') as FlagRead,&lt;BR /&gt; subfield('$(file)', '.', -1) as FileExtension,&lt;BR /&gt; subfield('$(file)', '\', -1) as FileName,&lt;BR /&gt; subfield (subfield('$(file)', '\', -1),'.' ,1) as Name&lt;BR /&gt;&amp;nbsp; AUTOGENERATE 1&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;&amp;nbsp; FOR EACH subdir in dirlist( '$(dir)' &amp;amp; '\*' )&lt;BR /&gt;&amp;nbsp; CALL doDir('$(subdir)')&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;END SUB&lt;BR /&gt; SUB doRoot (root)&lt;BR /&gt;&amp;nbsp; FOR EACH subdir in dirlist( '$(root)' )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; CALL doDir('$(subdir)')&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;END SUB&lt;BR /&gt;FOR i = 0 to FieldValueCount('Dirspec')&lt;BR /&gt;&amp;nbsp; Call doRoot(FieldValue('Dirspec',$(i)));&lt;BR /&gt;NEXT i&lt;BR /&gt; let ft=peek('FlagRead');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; let fn=peek('FileName');&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; trace ft=$(ft);&lt;BR /&gt;&amp;nbsp; if ($(ft)=1) then&lt;/P&gt;&lt;P&gt;Load * from&lt;/P&gt;&lt;P&gt;Load * from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But its loading only few files, stop at when it reaches the &lt;STRONG&gt;Non-Updated file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2014 11:14:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-10-20T11:14:39Z</dc:date>
    <item>
      <title>How to read all the files using file time</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-all-the-files-using-file-time/m-p/662272#M668502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to load files only which are updated in this month using the code&lt;/P&gt;&lt;P&gt;DirectoriesToScan:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Dirspec&lt;BR /&gt;D:\Project LAC Reconciliation UI\Data\OGIS&lt;BR /&gt;]&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;SUB doDir (dir)&lt;BR /&gt;&amp;nbsp; FOR EACH file in filelist('$(dir)' &amp;amp;&amp;nbsp; '\*.txt')&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Files:&lt;BR /&gt;&amp;nbsp; LOAD &lt;BR /&gt;&amp;nbsp; '$(file)' as FilePath,&lt;BR /&gt; FileSize('$(file)') as FileSize,&lt;BR /&gt; FileTime('$(file)') as FileTime,&lt;BR /&gt; if(FileTime( '$(file)' ) &amp;gt;= MonthStart(Today()), 1,'0') as FlagRead,&lt;BR /&gt; subfield('$(file)', '.', -1) as FileExtension,&lt;BR /&gt; subfield('$(file)', '\', -1) as FileName,&lt;BR /&gt; subfield (subfield('$(file)', '\', -1),'.' ,1) as Name&lt;BR /&gt;&amp;nbsp; AUTOGENERATE 1&lt;BR /&gt;&amp;nbsp; ;&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;&amp;nbsp; FOR EACH subdir in dirlist( '$(dir)' &amp;amp; '\*' )&lt;BR /&gt;&amp;nbsp; CALL doDir('$(subdir)')&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;END SUB&lt;BR /&gt; SUB doRoot (root)&lt;BR /&gt;&amp;nbsp; FOR EACH subdir in dirlist( '$(root)' )&lt;BR /&gt;&amp;nbsp;&amp;nbsp; CALL doDir('$(subdir)')&lt;BR /&gt;&amp;nbsp; NEXT&lt;BR /&gt;END SUB&lt;BR /&gt;FOR i = 0 to FieldValueCount('Dirspec')&lt;BR /&gt;&amp;nbsp; Call doRoot(FieldValue('Dirspec',$(i)));&lt;BR /&gt;NEXT i&lt;BR /&gt; let ft=peek('FlagRead');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; let fn=peek('FileName');&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; trace ft=$(ft);&lt;BR /&gt;&amp;nbsp; if ($(ft)=1) then&lt;/P&gt;&lt;P&gt;Load * from&lt;/P&gt;&lt;P&gt;Load * from&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But its loading only few files, stop at when it reaches the &lt;STRONG&gt;Non-Updated file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Pavan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 11:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-all-the-files-using-file-time/m-p/662272#M668502</guid>
      <dc:creator />
      <dc:date>2014-10-20T11:14:39Z</dc:date>
    </item>
  </channel>
</rss>

