<?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: Load Latest folder files in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022512#M938732</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-8912"&gt;Load latest Excel file to Qlikview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/75751"&gt;how to Load only the latest files?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Feb 2016 12:04:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-02-01T12:04:37Z</dc:date>
    <item>
      <title>Load Latest folder files</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022511#M938731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help in the below scenario:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have subfolders in QVData folder as below and in the same order&lt;/P&gt;&lt;P&gt;BD-4&lt;/P&gt;&lt;P&gt;BD-3&lt;/P&gt;&lt;P&gt;BD-2&lt;/P&gt;&lt;P&gt;BD-1&lt;/P&gt;&lt;P&gt;BD1&lt;/P&gt;&lt;P&gt;BD2&lt;/P&gt;&lt;P&gt;BD3&lt;/P&gt;&lt;P&gt;BD4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first I will have BD-4 folder only available, but after interval of time, another folder named BD-3 will be created and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to old .XLS files from only the Latest folder available as per the order of folders above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 12:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022511#M938731</guid>
      <dc:creator />
      <dc:date>2016-02-01T12:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Load Latest folder files</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022512#M938732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-8912"&gt;Load latest Excel file to Qlikview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/75751"&gt;how to Load only the latest files?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 12:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022512#M938732</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-01T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Load Latest folder files</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022513#M938733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code will load three year excel files based on file name ,You can modify your code based on your requirement,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1454328926603832 jive_text_macro" jivemacro_uid="_1454328926603832" modifiedtitle="true"&gt;
&lt;P&gt;LET vFilePath = 'Your Path'; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR EACH file in FileList('$(vFilePath)\File*.xlsx'); &lt;/P&gt;
&lt;P&gt;LET vFileYear =&amp;nbsp; Left(Right(file, 9), 4);&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LET vMaxYear1 = (Rangemax(vFileYear, vMaxYear1))-1;&lt;/P&gt;
&lt;P&gt;LET vMaxYear2 = (Rangemax(vFileYear, vMaxYear2))-2;&lt;/P&gt;
&lt;P&gt;LET vMaxYear&amp;nbsp; = (Rangemax(vFileYear, vMaxYear)); &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Next&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Data: &lt;/P&gt;
&lt;P&gt;LOAD * &lt;/P&gt;
&lt;P&gt;FROM &lt;/P&gt;
&lt;P&gt;[$(vFilePath)\Eng-$(vMaxYear1).xlsx]&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Data);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD * &lt;/P&gt;
&lt;P&gt;FROM &lt;/P&gt;
&lt;P&gt;[$(vFilePath)\Eng-$(vMaxYear2).xlsx]&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Data);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD * &lt;/P&gt;
&lt;P&gt;FROM &lt;/P&gt;
&lt;P&gt;[$(vFilePath)\Eng-$(vMaxYear).xlsx]&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;(ooxml, embedded labels, table is Data);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Hirish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 12:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022513#M938733</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2016-02-01T12:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Load Latest folder files</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022514#M938734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Angad,&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;To get subfolders list from a folder, you can use this script&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;_Root&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'ROOT FOLDER PATH';&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;For&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Each&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;Dir&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DirList&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ('$(_Root)'&amp;amp;'\*')&lt;BR /&gt; Directories:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; '$(Dir)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DirectoryPath&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubField&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('$(Dir)','\',&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;SubStringCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('$(Dir)','\')+1) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DirectoryName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AutoGenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;NEXT&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;Dir&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Then find last one (use any other function to get max value from folders list)&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14543482549098913" jivemacro_uid="_14543482549098913"&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;LastDirectory:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;MaxString&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;DirectoryName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LastDirectory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Directories&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vLastDirectory&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('LastDirectory',-1,'LastDirectory');&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;DROP&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; LastDirectory; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;And Finally load files from this folder&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;For&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Each&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;File&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FileList&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ('$(_Root)'&amp;amp;'$(vLastDirectory)'&amp;amp;'\.xls')&lt;BR /&gt; Data:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(File)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;embedded&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1) &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;// edit it, if needed&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;File&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 10pt;"&gt;I haven't test it properly, so I couldn't work as it is.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Feb 2016 17:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Latest-folder-files/m-p/1022514#M938734</guid>
      <dc:creator>yura_ratu</dc:creator>
      <dc:date>2016-02-01T17:35:18Z</dc:date>
    </item>
  </channel>
</rss>

