<?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: Pick latest file from Drive in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731501#M722143</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This only gets all the files listed in the Directory under 'File' and timestamps under 'Timestamp' columns. But I need to load only the file with maximum date on it. Also, there are other files in the location and hence I only need to do this for the files that end with 'Data' (Example File name: 2020-07-28 14-33 Data.xls)&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2020 19:25:30 GMT</pubDate>
    <dc:creator>qlikwiz123</dc:creator>
    <dc:date>2020-07-28T19:25:30Z</dc:date>
    <item>
      <title>Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731478#M722141</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have files being saved everyday in a folder and the names of the files are date and time stamped as below&lt;/P&gt;&lt;P&gt;2020-07-20 10-51 Data.xlsx&lt;/P&gt;&lt;P&gt;2020-07-21 12-22 Data.xlsx&lt;/P&gt;&lt;P&gt;2020-07-22 14-56 Data.xlsx&lt;/P&gt;&lt;P&gt;2020-07-23 10-09 Data.xlsx&lt;/P&gt;&lt;P&gt;2020-07-24 18-32 Data.xlsx&lt;/P&gt;&lt;P&gt;2020-07-25 17-54 Data.xlsx&lt;/P&gt;&lt;P&gt;The format is YYYY-MM-DD HH-MM&lt;/P&gt;&lt;P&gt;I tried some ways but I think due to this unconventional datetime stamp, it is not working&lt;/P&gt;&lt;P&gt;How do I pick up the latest file every time I run the script?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:17:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731478#M722141</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2024-11-16T18:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731493#M722142</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can use this code to generate a list of the files:&lt;/P&gt;&lt;P&gt;for each vFile in FileList('C:\users\username\documents\*.xlsx')&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Files:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;LOAD '$(vFile)' AS File,&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;timestamp(timestamp#(left(SubField('$(vFile)', '\', -1),16), 'YYYY-MM-DD hh-mm')) AS Timestamp&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;AutoGenerate(1);&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;Then, work on the table to get the newest file.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 18:58:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731493#M722142</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2020-07-28T18:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731501#M722143</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This only gets all the files listed in the Directory under 'File' and timestamps under 'Timestamp' columns. But I need to load only the file with maximum date on it. Also, there are other files in the location and hence I only need to do this for the files that end with 'Data' (Example File name: 2020-07-28 14-33 Data.xls)&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 19:25:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731501#M722143</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-07-28T19:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731523#M722144</link>
      <description>&lt;P&gt;try below. Change the folder path to your actual folder location&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;&lt;STRONG&gt;first 1&lt;/STRONG&gt; LOAD FileBaseName() as FileName,&lt;BR /&gt;timestamp#(trim(purgechar(lower(FileBaseName()),'data')),'YYYY-MM-DD hh-mm') as Time&lt;BR /&gt;FROM&lt;BR /&gt;[C:\&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;*Data.xlsx&lt;/STRONG&gt;&lt;/FONT&gt;]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;Max:&lt;BR /&gt;load FirstSortedValue(FileName,-Time) as Max_Time_FileName&lt;BR /&gt;Resident Data;&lt;/P&gt;&lt;P&gt;DROP Table Data;&lt;/P&gt;&lt;P&gt;let &lt;STRONG&gt;vMax_Time_File_Name&lt;/STRONG&gt; =Peek('Max_Time_FileName',0,'Max');&lt;/P&gt;&lt;P&gt;Data:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[C:\&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;$(vMax_Time_File_Name).xlsx&lt;/STRONG&gt;&lt;/FONT&gt;]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 21:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731523#M722144</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-28T21:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731825#M722145</link>
      <description>&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jul 2020 15:18:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1731825#M722145</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-07-29T15:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732135#M722146</link>
      <description>&lt;P&gt;H&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see it picking up the file at all. And hence the variable is empty and the file reload fails. Here are my files that I am using to test.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 14:34:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732135#M722146</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-07-30T14:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732160#M722147</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have blank excel. Please put some data. I assumed that excel file should have data.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 15:14:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732160#M722147</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-07-30T15:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Pick latest file from Drive</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732168#M722148</link>
      <description>&lt;P&gt;Got that, thank you&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2020 15:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-latest-file-from-Drive/m-p/1732168#M722148</guid>
      <dc:creator>qlikwiz123</dc:creator>
      <dc:date>2020-07-30T15:31:02Z</dc:date>
    </item>
  </channel>
</rss>

