<?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: How to check if a QVD file exists when it's name isn't fixed? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864425#M302519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am indeed moving processed files into a separate folder later on in the load script, so * is safe enough at this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is very unlikely that a file will have been created for exactly the time that I am running this aspect of the script. ie that a TABLENAME_now().qvd will exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I need to do is check that something in the format TABLENAME*.qvd exists ready to be loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2015 16:48:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-19T16:48:07Z</dc:date>
    <item>
      <title>How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864419#M302513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As part of my incremental load process, I am loading in a number of smaller QVD files into other QVD files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The small files are created with a date string on the end of the filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before attempting to load the small files, I would like to check to see if any exist, so it can fail gracefully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The examples I have found use the QvdCreateTime() function to check if a QVD file exists, but this needs a specific filename passed in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a way of checking to see if any files exist when the filename is not fixed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie a file created today at midday would be&amp;nbsp; TABLENAME_20150619120000.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:11:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864419#M302513</guid>
      <dc:creator />
      <dc:date>2015-06-19T16:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864420#M302514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you use a for loop like the one bellow, neither if it exists nor the name matters :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR EACH File in FileList('yourshare\*.qvd') &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864420#M302514</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2015-06-19T16:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864421#M302515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vQVDExist = 0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each File in Filelist('TABLENAME_*.qvd')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Let vQVDExist = 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next File&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:15:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864421#M302515</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864422#M302516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;the problem with using a "*" when reading files is that this will give you all files that exist in that folder for that table name, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;so unless you move the qvd's after you process them you will keep adding them in.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;Going back to the qvdcreatetime, you are able to add to a dynamic file name &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;let v&lt;SPAN style="font-size: 13.3333330154419px;"&gt;QVDTime = Now()&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;let vControlQVD = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;TABLENAME_&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;$(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;v&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;QVDTime &lt;/SPAN&gt;)&lt;/SPAN&gt;.qvd';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vControlQVDPathCreationDate =&amp;nbsp; filetime( '$(vControlQVD)' );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if len('$(vControlQVDPathCreationDate)') &amp;gt;&amp;nbsp; 0 then&lt;/P&gt;&lt;P&gt;whatever you want to do&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:36:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864422#M302516</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-06-19T16:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864423#M302517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to clarify the question a little bit - all I need is establish if a file of type TABLENAME_*.qvd exists before using the LOAD * from TABLENAME_*.qvd syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using a hybrid of the answers above, I came up with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Check there are some files to load...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vFileExists = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For each File in ('$(vDataPath)$(vTableName)_*.qvd')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vFileExists = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit for when $(vFileExists) = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NEXT File&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; if $(vFileExists) = 1 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * from $(vDataPath)$(vTableName)_*.qvd;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRACE No Files to Load;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this does not seems to work. Does the For loop always execute? I would have thought it would only enter the body of the loop if the filelist had some files in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864423#M302517</guid>
      <dc:creator />
      <dc:date>2015-06-19T16:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864424#M302518</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;Try doing something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(FileSize(FileSource\TABLENAME_20150619120000.qvd) )&amp;gt; 0 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do whatever you want when the file exist&lt;/P&gt;&lt;P&gt; else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Do whatever you want if the file doesn't exist..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ENDIF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864424#M302518</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2015-06-19T16:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864425#M302519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am indeed moving processed files into a separate folder later on in the load script, so * is safe enough at this point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is very unlikely that a file will have been created for exactly the time that I am running this aspect of the script. ie that a TABLENAME_now().qvd will exist&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I need to do is check that something in the format TABLENAME*.qvd exists ready to be loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864425#M302519</guid>
      <dc:creator />
      <dc:date>2015-06-19T16:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864426#M302520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vFileExists = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For each File in ('$(vDataPath)$(vTableName)_*.qvd')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vFileExists = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit for when $(vFileExists) = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NEXT File&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are missing the filelist() here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;&amp;nbsp; For each File in FileList('$(vDataPath)$(vTableName)_*.qvd')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 16:58:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864426#M302520</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T16:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864427#M302521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, it appears I had missed the filelist mask within the For loop definition....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it works using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each File in filelist ('$(vDataPath)$(vTableName)_*.qvd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:06:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/864427#M302521</guid>
      <dc:creator />
      <dc:date>2015-06-19T17:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if a QVD file exists when it's name isn't fixed?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/1591221#M443578</link>
      <description>&lt;P&gt;Hello sir, I am an intern working on a project where I'm facing a similar issue. My objective is to check whether the file was created before 6.15 am of the current date and notify (trigger an email on nprint) the concerned person if it hasn't. I'm trying to use something similar and I'm inserting a where clause but i still can't figure it out! Any help would be appreciated! Thanks in advance!!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 18:59:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-check-if-a-QVD-file-exists-when-it-s-name-isn-t-fixed/m-p/1591221#M443578</guid>
      <dc:creator>deborahs</dc:creator>
      <dc:date>2019-06-12T18:59:23Z</dc:date>
    </item>
  </channel>
</rss>

