<?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 Store in variable path with variable file name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413509#M700791</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I was trying to list out all the .tab files in a folder, and store the files as .qvd with the same name. Hence, I tried to take the FileName from the list of files. I failed to store the .qvd file in a separate folder with the same name as the .tab file.&lt;/P&gt;&lt;P&gt;I have specified variables for the folder paths as the script is needed to run on a schedule basis by the power users with 15 different files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody point out where my mistake was?&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_13523398425815634" jivemacro_uid="_13523398425815634"&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13523398892093235" jivemacro_uid="_13523398892093235"&gt;&lt;P&gt;sPathBase = 'D:\QlikView\Project\';&lt;BR /&gt;sPathQVDBase = (sPathBase) &amp;amp; '02_QVDGenerators\QVD\L1_Base\';&lt;BR /&gt;sPathQVDApp = (sPathBase) &amp;amp; '02_QVDGenerators\QVD\L2_Transform\';&lt;BR /&gt;sPathResources = (sPathBase) &amp;amp; '01_Resources\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Dodir(Root)&lt;BR /&gt; for each FileExtension in 'tab'&lt;BR /&gt;&amp;nbsp; for each FoundFile in filelist( Root &amp;amp; '\*.' &amp;amp; FileExtension)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; let FoundFile = PurgeChar(FoundFile , Chr(39));&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; FileList:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; load '$(FoundFile)' as Filename, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; subfield('$(FoundFile)','\') as Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Autogenerate(1);&lt;BR /&gt;&amp;nbsp; next FoundFile&lt;BR /&gt; next FileExtension&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;call DoDir('D:\QlikView\RetailFinance\01_Resources');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewFileName = Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load from tab files and store into qvd files&lt;BR /&gt;File:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(FileName)]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is spaces);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE File INTO $(sPathQVDBase)$(NewFileName).qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table File;&lt;/P&gt;&lt;/PRE&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Nov 2012 02:03:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-08T02:03:04Z</dc:date>
    <item>
      <title>Store in variable path with variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413509#M700791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I was trying to list out all the .tab files in a folder, and store the files as .qvd with the same name. Hence, I tried to take the FileName from the list of files. I failed to store the .qvd file in a separate folder with the same name as the .tab file.&lt;/P&gt;&lt;P&gt;I have specified variables for the folder paths as the script is needed to run on a schedule basis by the power users with 15 different files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody point out where my mistake was?&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_13523398425815634" jivemacro_uid="_13523398425815634"&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13523398892093235" jivemacro_uid="_13523398892093235"&gt;&lt;P&gt;sPathBase = 'D:\QlikView\Project\';&lt;BR /&gt;sPathQVDBase = (sPathBase) &amp;amp; '02_QVDGenerators\QVD\L1_Base\';&lt;BR /&gt;sPathQVDApp = (sPathBase) &amp;amp; '02_QVDGenerators\QVD\L2_Transform\';&lt;BR /&gt;sPathResources = (sPathBase) &amp;amp; '01_Resources\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Dodir(Root)&lt;BR /&gt; for each FileExtension in 'tab'&lt;BR /&gt;&amp;nbsp; for each FoundFile in filelist( Root &amp;amp; '\*.' &amp;amp; FileExtension)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; let FoundFile = PurgeChar(FoundFile , Chr(39));&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; FileList:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; load '$(FoundFile)' as Filename, &lt;BR /&gt;&amp;nbsp;&amp;nbsp; subfield('$(FoundFile)','\') as Name&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Autogenerate(1);&lt;BR /&gt;&amp;nbsp; next FoundFile&lt;BR /&gt; next FileExtension&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;call DoDir('D:\QlikView\RetailFinance\01_Resources');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewFileName = Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load from tab files and store into qvd files&lt;BR /&gt;File:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(FileName)]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is spaces);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE File INTO $(sPathQVDBase)$(NewFileName).qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table File;&lt;/P&gt;&lt;/PRE&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 02:03:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413509#M700791</guid>
      <dc:creator />
      <dc:date>2012-11-08T02:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: Store in variable path with variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413510#M700792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;STORE File INTO $(sPathQVDBase) &lt;STRONG&gt;&amp;amp;&amp;nbsp; &lt;/STRONG&gt;$(NewFileName).qvd (qvd);&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;STORE File INTO '$(sPathQVDBase)' &lt;/SPAN&gt;&lt;STRONG style="font-family: monospace;"&gt;&amp;amp;&amp;nbsp; '&lt;/STRONG&gt;&lt;SPAN style="font-family: monospace;"&gt;$(NewFileName)'.qvd (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: monospace;"&gt;hope this helps&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2012 06:55:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413510#M700792</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2012-11-08T06:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Store in variable path with variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413511#M700793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi SK. Thanks for your reply. However, it didn't work. Apparently putting both the path and filename as variable is just not being done in QV. I have done a workaround by moving the files instead after storing the tables in QVD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Nov 2012 08:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Store-in-variable-path-with-variable-file-name/m-p/413511#M700793</guid>
      <dc:creator />
      <dc:date>2012-11-14T08:13:32Z</dc:date>
    </item>
  </channel>
</rss>

