<?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: Request for change in vL.FileExist function. in Archived Groups</title>
    <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637071#M2586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vadim, we will validate and add your addition &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Magnus &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2014 06:28:05 GMT</pubDate>
    <dc:creator>Magnus_Berg</dc:creator>
    <dc:date>2014-05-19T06:28:05Z</dc:date>
    <item>
      <title>Request for change in vL.FileExist function.</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637070#M2585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've recently found that vL.FileExist function is unsufficiently robust in QDF.&lt;/P&gt;&lt;P&gt;Consider that snippet from QVD-Generator-Example of 1.Example container (QDF version 1.4.0).&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_1400417143060353" jivemacro_uid="_1400417143060353"&gt;
&lt;P&gt;// Folder for output QVDs use&lt;/P&gt;
&lt;P&gt;// Use QlikView Deployment Framework Variable $(vG.QVDPath)&lt;/P&gt;
&lt;P&gt;LET vL.QVDPath = '$(vG.QVDPath)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;// Check if folder exists by using function call vL.FileExist&lt;/P&gt;
&lt;P&gt;call vL.FileExist ('$(vL.QVDPath)*')&lt;/P&gt;
&lt;P&gt;if vL.FileExist = 'false' then; trace '### DF Did not find $(vL.QVDPath), exit script'; sleep 5000 ;exit script; endif;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apparently we should be calm about QVD folder existence after that check. But if I deliberately remove 2.QVD folder from 1.Example container script still moves futher.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some debugging shows that if I physically remove 2.QVD directory, vG.QVDPath variable becomes empty and effectively we call vL.FileExist function with parameter '*' - and that always return true. That is not good, because function would return same falsely positive result if I for example misspell path variable:&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_14004171430562457" jivemacro_uid="_14004171430562457"&gt;
&lt;P&gt;call vL.FileExist ('$(vG.QvdPath)');&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or even &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14004171430504836 jive_text_macro jive_macro_code" jivemacro_uid="_14004171430504836"&gt;
&lt;P&gt;call vL.FileExist ('$(vG.ABRACADABRA));&lt;/P&gt;



&lt;/PRE&gt;&lt;P&gt;would return true.&lt;/P&gt;&lt;P&gt;On the other hand we cannot simply omit trailing star when check for QDF paths, because they all have a trailing '\' and vL.FileExist always return false on directory path with trailing '\'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my proposal is twofold:&lt;/P&gt;&lt;P&gt;1. Change vL.FileExist so that it remove trailing '\' from parameter if it present.&lt;/P&gt;&lt;P&gt;2. Change examples and docs to discurage using * in vL.FileExist paramteter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proposed variant of function with added&amp;nbsp; lines 2-4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14004171430391399 jive_macro_code" jivemacro_uid="_14004171430391399"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;sub vL.FileExist (vL.Root)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if Right('$(vL.Root)',1) = '\' then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vL.Root = Left(vL.Root,Len(vL.Root)-1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if IsNull(filesize('$(vL.Root)')) = -1&amp;nbsp; then&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SET vL.FileExist='false';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;/P&gt;
&lt;P&gt;&amp;nbsp; SET vL.FileExist='true';&lt;/P&gt;
&lt;P&gt;&amp;nbsp; endif&lt;/P&gt;
&lt;P&gt;&amp;nbsp; set vL.Root=;&lt;/P&gt;
&lt;P&gt;end sub;&lt;/P&gt;
&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 11.818181991577148px;"&gt;vG.QVDPath&lt;/SPAN&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 11.818181991577148px;"&gt;vG.QVDPath&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2025 17:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637070#M2585</guid>
      <dc:creator>vadimtsushko</dc:creator>
      <dc:date>2025-07-22T17:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: Request for change in vL.FileExist function.</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637071#M2586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vadim, we will validate and add your addition &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Magnus &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 06:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637071#M2586</guid>
      <dc:creator>Magnus_Berg</dc:creator>
      <dc:date>2014-05-19T06:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Request for change in vL.FileExist function.</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637072#M2587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Vadim, I have validated your modification but found out that the biggest problem with this example is the trailing *.&lt;/P&gt;&lt;P&gt;This will create a false true i&lt;SPAN lang="EN-US"&gt;f a variable is null for example:&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt; &lt;EM&gt;&lt;SPAN style="color: #4f81bd;"&gt;call&lt;/SPAN&gt; &lt;SPAN style="color: #7f7f7f;"&gt;vL.FileExist&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;('$(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;NullVariable&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;)*); &lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US"&gt;Will return &lt;EM&gt;true&lt;/EM&gt; as the function will search for * in the current app location (relative path).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;I've added a warning into development guide and will remove * in all examples.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US"&gt;Magnus&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 10.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 07:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637072#M2587</guid>
      <dc:creator>Magnus_Berg</dc:creator>
      <dc:date>2014-05-19T07:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Request for change in vL.FileExist function.</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637073#M2588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Magnus, I believe this is interrelated problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example you cannot simply remove * from that QVD-Generator-Example.qvw because&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1400485273612560" jivemacro_uid="_1400485273612560"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 11.818181991577148px; background-color: #f8f8f8;"&gt;call vL.FileExist ('$(vL.QVDPath)')&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;would return false even in normal situation when 2.QVD folder actually exists. Because vG.QVDPath variable&amp;nbsp; ends with '\'.&lt;/P&gt;&lt;P&gt;So it should be firstly function change and then change in all examples and docs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 07:40:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637073#M2588</guid>
      <dc:creator>vadimtsushko</dc:creator>
      <dc:date>2014-05-19T07:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Request for change in vL.FileExist function.</title>
      <link>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637074#M2589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree, did that as well &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;The fix is out now (still 1.4.0).&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 07:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Archived-Groups/Request-for-change-in-vL-FileExist-function/m-p/637074#M2589</guid>
      <dc:creator>Magnus_Berg</dc:creator>
      <dc:date>2014-05-19T07:50:32Z</dc:date>
    </item>
  </channel>
</rss>

