<?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 file based on timestamp in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506166#M1146090</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the 29 for a 64. Thats the correct position where your date is. Beware with the date position in the filename, it must be always in the same place:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(mid( '$(File)' ,64,11), 'DD-MMM-YYYY'));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Aug 2013 10:19:34 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-21T10:19:34Z</dc:date>
    <item>
      <title>Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506157#M1146081</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;Could someone please help me to change the below load script so that it will only load files where the first date in the file name (format DD-MMM-YYYY) is bigger (newer) than a variable date that must be set at thestart of the load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;Load [Appl No],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Product No],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(Date#( left( [Decision Date],11), 'DD-MMM-YYYY')) as [Decision Date],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if([Decicion Result]='A','Approved','Declined') as [Decision Result],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('PQVolumeMap',[Champion Challenge No],'Unknown') as [PQ App Volume],&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('PQVolumeMap2',[Champion Challenge No],'Unknown') as [PQ App Volume (Campaign Only)],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Champion Challenge No] as [Champion Challenge No App Extract],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Champion Challenge Desc]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;C&gt;&lt;/C&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;(txt, codepage is 1252, embedded labels, delimiter is '~', no quotes)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt;"&gt;&lt;STRONG&gt;WHERE [Champion Challenge No] &amp;gt;= $(vPQLow) AND [Champion Challenge No] &amp;lt;= $(vPQHigh);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A file will be named like this:&lt;/P&gt;&lt;P&gt;Weekly_ApplicationExtract_ACKS_05-AUG-2013_11-AUG-2013_12082013045043.txt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I please request that you help me with a full load script (end-to-end), as this is brand new territory for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 11:17:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506157#M1146081</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-20T11:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506158#M1146082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could do it this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Variable for counting the number of files loaded:&lt;/P&gt;&lt;P&gt;LET FileCount&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;/P&gt;&lt;P&gt;// Variable to set the minimun file date:&lt;/P&gt;&lt;P&gt;LET MinFileDate&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Today());&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR Each File in FileList ('Folder\*.txt');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(Left(Right( '$(File)' ,42),11), 'DD-MMM-YYYY'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF $(FileDate)&amp;gt;$(MinFileDate) THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET FileCount = $(FileCount)+1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE Loading $(File) ($(FileDate));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyTable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * From $(File);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRACE No more Files. $(FileCount) files loaded;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, all the .txt are located in a folder called 'Folder', in the same root as the .qvw.Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 13:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506158#M1146082</guid>
      <dc:creator />
      <dc:date>2013-08-20T13:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506159#M1146083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first instinct would be to first analyse the contents of the directory by loading all filenames into a table, and then loop through the contents of that table to select the appropriate filenames and execute a LOAD command on those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to invite you to take a look at the CALL instruction in QlikView's in program help (F1), where a nice example on constructing a DoDir procedure would help you accomplish your goal:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13770069994697799" jivemacro_uid="_13770069994697799"&gt;
&lt;P&gt;LET vRoot = 'C:\Users\tenba1\Documents\QlikView\Master File Extracts\Ackermans\Application Extracts\Application Extracts (QVD) - ACKERMANS\3';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;SUB DoDir (Root)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; FOR Each File in FileList(Root&amp;amp;'\*.txt')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Files:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD '$(File)' as File_Name&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoGenerate 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; NEXT File&lt;/P&gt;
&lt;P&gt;ENDSUB&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;CALL DoDir (vRoot)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i=0 to NoOfRows('Files')-1 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; LET vFileName = Peek('File_Name', 0, 'Files');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; IF Date(Date#(SubField(vFileName, '_', 4), 'DD-MMM-YYYY')) &amp;gt;= vDateFrom and Date(Date#(SubField(vFileName, '_', 5), 'DD-MMM-YYYY')) &amp;lt;= vDateTo then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AppExtracts:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From [$(vRoot)\$(vFileName)];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;
&lt;P&gt;NEXT i;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. Please bear in mind I didn't test this script, it might still need slight adjustments &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 13:56:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506159#M1146083</guid>
      <dc:creator>pgrenier</dc:creator>
      <dc:date>2013-08-20T13:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506160#M1146084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have the below, but it is not working. It loads my first table (Accounts&amp;nbsp; - see image 1) and then "Execution of script failed. Reload old data?":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;// Variable for counting the number of files loaded:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;LET FileCount&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;// Variable to set the minimun file date:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;LET MinFileDate&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Today()-10);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;FOR Each File in FileList ('C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)\*.txt');&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(Left(Right( '$(File)' ,42),11), 'DD-MMM-YYYY'));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF $(FileDate)&amp;gt;$(MinFileDate) THEN&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET FileCount = $(FileCount)+1;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE Loading $(File) ($(FileDate));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyTable:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;SPAN style="color: #ff9900;"&gt; [Account No], &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #ff9900;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')) as [Effective Date], &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #ff9900;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Tran Code], &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #ff9900;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Trans Amount]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #ff9900;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From $(File)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #ff9900;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (txt, codepage is 1252, embedded labels, delimiter is '~', no quotes, header is 1 lines)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG style="color: #ff9900;"&gt;WHERE ([Tran Code]=35 or [Tran Code]=36 or [Tran Code]=37 or [Tran Code]=931) and (exists([Account No]))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ENDIF&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;NEXT File;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;TRACE No more Files. $(FileCount) files loaded;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the attached images as well - what am I doing wrong? It is the "Transactions" tab where I want to use this code (and eventually also on the applications tab).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 08:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506160#M1146084</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T08:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506161#M1146085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, you might notice that I am loading something different now that my original post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Transactions (Tab 2 - see images), are just easier to start with, but eventually I want to apply the same logic for the Transaction Files that I load (all in one folder), as well as the Application Files (separate folders).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:05:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506161#M1146085</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T09:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506162#M1146086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Before the &lt;EM&gt;"Execution of script failed. Reload old data?"&lt;/EM&gt; message, Qlikview pop-ups a message with a brief explanation about the error. Could you paste that text in order to make it easier to look for the error. The message should be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;IMG alt="Error.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/45759_Error.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506162#M1146086</guid>
      <dc:creator />
      <dc:date>2013-08-21T09:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506163#M1146087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I use the script I pasted above, then the Account Extract loads, and then it seems like one transaction extracts starts to load... it says this in the execution (only if I have "Close when finished" NOT ticket):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loading C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)\Weekly_TransactionExtract_A_01-APR-2013_07-APR-2013_08042013050725.txt (2013/04/01)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But then the load stops and whern I click on CLose it gives me the &lt;EM style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;"Execution of script failed. Reload old data?"&lt;/EM&gt; message. See image 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I made this change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;EM&gt;&lt;STRONG&gt;LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(mid( '$(File)' ,29,11), 'DD-MMM-YYYY'));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when I load I get this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Script line error: &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;IF &amp;gt;2013/08/01 THEN&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:36:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506163#M1146087</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T09:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506164#M1146088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you are evaluating the filename including the path where mid(file,29,11) does not evaluate to a valid date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can use something like the following (modify to your needs, the principle works):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DatesOfFiles:&lt;/P&gt;&lt;P&gt;LOAD MaxString(Mid(FileBaseName(),36, 4)&amp;amp;Mid(FileBaseName(),33, 3)&amp;amp;Mid(FileBaseName(),29, 2)) AS PossibleDates&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;*.txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vLastDate = Peek('PossibleDates', -1);&lt;/P&gt;&lt;P&gt;LET file='Something'&amp;amp;vLastDate&amp;amp;'.txt';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE DatesOfFiles;&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;....&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;$(file)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 09:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506164#M1146088</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2013-08-21T09:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506165#M1146089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piet,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only tried loading the DatesofFiles Table, and the concept works - the problem is this takes very long to load, which defeats my original purpose of speeding up the load by only loading from files that are relevant to the Campaign I am reporting on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea how I can get this statement right so that it sees a valid date:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(mid( '$(File)' ,29,11), 'DD-MMM-YYYY'));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;An example of a filename is:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;Weekly_ApplicationExtract_ACKS_05-AUG-2013_11-AUG-2013_12082013045043.txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506165#M1146089</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T10:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506166#M1146090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Change the 29 for a 64. Thats the correct position where your date is. Beware with the date position in the filename, it must be always in the same place:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET FileDate&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Date#(mid( '$(File)' ,64,11), 'DD-MMM-YYYY'));&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506166#M1146090</guid>
      <dc:creator />
      <dc:date>2013-08-21T10:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506167#M1146091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the path is included in S(File) so the position of the date is not 29, find the correct position including the path or remove it first. Should be something like =MID(S(File),115,11)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:24:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506167#M1146091</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2013-08-21T10:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506168#M1146092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Philippe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your proposal. As I mentioned in my response to Piet, loading all of the filenames first will defeat my original purpose of speeding up the load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought there would be a way of just manipulating the FROM statement so that it looks at a variable.&lt;/P&gt;&lt;P&gt;So I would often say something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;SET vYear = 2013;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;LOAD *&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;FROM [directory\*$(vYear)*.txt]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And this will then just load files where the name contains "2013". Of course this is purely based on text - I expected there would be an easy way to change this so that it recognises the datestamp... but I am really struggling!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506168#M1146092</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T10:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506169#M1146093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The corerct position, including the path seemd to be 112.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still it doesn't work. It loads, and the fails with no more error messages. In brackets it does show the date based on the fiel name now:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Loading C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)\Weekly_TransactionExtract_A_01-APR-2013_07-APR-2013_08042013050725.txt (2013/04/01)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is going to drive me insane... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 10:42:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506169#M1146093</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T10:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506170#M1146096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange that a date of 2013-04-01 should evaluate &amp;gt; MinFileDate which is today-10 ??? or Am i missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other then that it seems that the datefile part of the script is now working and that you maybe have an other problem not related to this? My first hunch would be the exists condition...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 11:58:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506170#M1146096</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2013-08-21T11:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506171#M1146097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it was the exists condition it should just have loaded zero records, not bombed out, right? But to test I took that out and it still did the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried setting the MinFileDate to an older date so that 2013/04/01 WOULD actually be &amp;gt; than it, and then this happens:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Loading C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)\Weekly_TransactionExtract_A_&lt;SPAN style="color: #ff9900;"&gt;02-JAN-2012_08-JAN-2012&lt;/SPAN&gt;_09012012033516.txt (2012/01/02)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;--- Script Finished ---&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it also bombs out with the error message... but it tried to load the second file in the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that tells me it goes through the files (but it does not actually load anything), until it reaches a file where the date is smaller than MinFileDate then it bombs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 13:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506171#M1146097</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T13:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506172#M1146098</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;Philippe suggest to load the filenames, not the files, which should not take that long. You should give it a try I think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could replace the condition in the IF statement with whatever you want to do, like &lt;SPAN class="Bold"&gt;&lt;EM&gt;index(&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;vFileName, '2013') &amp;gt; 0&lt;/EM&gt;, to only keep files containing "2013"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:05:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506172#M1146098</guid>
      <dc:creator>Brice-SACCUCCI</dc:creator>
      <dc:date>2013-08-21T14:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506173#M1146099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did some testing and I did miss something, the statement&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF $(FileDate)&amp;gt;$(MinFileDate)&lt;/P&gt;&lt;P&gt;is NOT evaluating as dates.&lt;/P&gt;&lt;P&gt;I solved this in my test by storing the Num of Date in the variables, so in your case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET MinFileDate= Num(Date(Today()-10))&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET FileDate=Num(Date#(Mid................&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:21:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506173#M1146099</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2013-08-21T14:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506174#M1146100</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;You are correct, it does load quickly - sorry about that. But I can't get it to load the transactions, even though it reads all of the filenames correctly. It gives no error - it just loads nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see if you can see a problem here, or in the images:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style="font-size: 8pt;"&gt;LET vRoot = 'C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)'; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;LET vDateFrom&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Today()-20);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;LET vDateTo&amp;nbsp;&amp;nbsp;&amp;nbsp; = Date(Today()); &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;SUB DoDir (Root)&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; FOR Each File in FileList(Root&amp;amp;'\*.txt')&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Files:&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD '$(File)' as File_Name&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AutoGenerate 1;&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; NEXT File&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;ENDSUB&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;CALL DoDir (vRoot)&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;FOR i=0 to NoOfRows('Files')-1&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; LET vFileName = Peek('File_Name', 0, 'Files');&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; IF Date(Date#(SubField(vFileName, '_', 4), 'DD-MMM-YYYY')) &amp;gt;= vDateFrom and Date(Date#(SubField(vFileName, '_', 4), 'DD-MMM-YYYY')) &amp;lt;= vDateTo then&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TranExtracts:&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD [Account No],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(DATE#( left([Effective Date],11), 'DD-MMM-YY')) as [Effective Date],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Tran Code],&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Trans Amount]&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; From [$(vRoot)\$(vFileName)]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (txt, codepage is 1252, embedded labels, delimiter is '~', no quotes, header is 1 lines)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;WHERE ([Tran Code]=35 or [Tran Code]=36 or [Tran Code]=37 or [Tran Code]=931) and (exists([Account No]));&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp; ENDIF&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;NEXT i;&lt;/SPAN&gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:36:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506174#M1146100</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T14:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506175#M1146101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the same result as before except the date in brackets shows as Num:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Loading C:\Users\tenba1\Documents\QlikView\Master File Extracts\Transaction Extracts (QVD)\Weekly_TransactionExtract_A_12-AUG-2013_18-AUG-2013_19082013093040.txt (41498)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then the error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:39:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506175#M1146101</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T14:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Load file based on timestamp</title>
      <link>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506176#M1146102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached is the log file but doubt that is much help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-file-based-on-timestamp/m-p/506176#M1146102</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2013-08-21T14:58:30Z</dc:date>
    </item>
  </channel>
</rss>

