<?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: String handling of file Path in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543777#M686999</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is a constant length then use left/right/mid functions to select what you need. If it is variable length then use the subfield function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Jan 2014 09:31:26 GMT</pubDate>
    <dc:creator>DavidFoster1</dc:creator>
    <dc:date>2014-01-02T09:31:26Z</dc:date>
    <item>
      <title>String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543769#M686991</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;This is part of my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each FoundFile in filelist( Root &amp;amp; '\*.csv')&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vTemp=&amp;nbsp; '$(FoundFile)';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let vTemp2= upper(left(filename('$(FoundFile)'),len(filename('$(FoundFile)'))-21));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;vTemp&lt;/TD&gt;&lt;TD&gt;"C:\decisioning\log\dcs\1\1\dcs_meta_data_20131126113434.csv"&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;vTemp2&lt;/TD&gt;&lt;TD&gt;&amp;lt;NULL&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to isolate the file name without the date stamp, extension and folders and to show it in upper case letters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where am I wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Boris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 08:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543769#M686991</guid>
      <dc:creator />
      <dc:date>2014-01-02T08:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543770#M686992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think you need the single quotes around your $(Foundfile) declarations.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 08:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543770#M686992</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-01-02T08:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543771#M686993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I remove them then I don't get event a result for vTemp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:02:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543771#M686993</guid>
      <dc:creator />
      <dc:date>2014-01-02T09:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543772#M686994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I misread the double quotes in your question. The issue is the filename function. It only works when loading data from a file. You should just look at using normal string functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vTemp2 = UPPER(RIGHT('$(vTemp)'),20);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543772#M686994</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-01-02T09:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543773#M686995</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 don't need to use expansions in these expressions, and filename() only works in a LOAD statement. Rather use subfield(), like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each vFoundFile in filelist( Root &amp;amp; '\*.csv') &lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vTemp1 = SubField(vFoundFile, '\', -1);&amp;nbsp;&amp;nbsp; // file name including extension&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let vTemp2 = SubField(SubField(vFoundFile, '\', -1), '.', 1);&amp;nbsp;&amp;nbsp; // file name excluding extension&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543773#M686995</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-01-02T09:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543774#M686996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Boris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename() function works only in a LOAD statement (see help). To extract the filename I would suggest to use index():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vFileName = mid('$(FoundFile)', index('$(FoundFile)', '\', -1) +1);&lt;/P&gt;&lt;P&gt;let vTemp2= upper(left('$(FoundFile)', len('$(vFileName)') -21));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543774#M686996</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-01-02T09:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543775#M686997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but now I get the file name without the extension but with the date stamp.&lt;/P&gt;&lt;P&gt;how can I remove the date stamp?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I use right function then I get the time stamp. &lt;/P&gt;&lt;P&gt;if I use left function I get partial names because each file has different name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I remove only the date stamp and to get finally this result for the current path:&lt;/P&gt;&lt;P&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;C:\decisioning\log\dcs\1\1\dcs_meta_data_20131126113434.csv&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&amp;nbsp;&amp;nbsp; DCS_META_DATA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543775#M686997</guid>
      <dc:creator />
      <dc:date>2014-01-02T09:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543776#M686998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work.&lt;/P&gt;&lt;P&gt;get only c:\dec&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:30:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543776#M686998</guid>
      <dc:creator />
      <dc:date>2014-01-02T09:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543777#M686999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is a constant length then use left/right/mid functions to select what you need. If it is variable length then use the subfield function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543777#M686999</guid>
      <dc:creator>DavidFoster1</dc:creator>
      <dc:date>2014-01-02T09:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: String handling of file Path</title>
      <link>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543778#M687000</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, my mistake:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vFileName = mid('$(FoundFile)', index('$(FoundFile)', '\', -1) +1);&lt;/P&gt;&lt;P&gt;let vTemp2= upper(left('$(vFileName)', len('$(vFileName)') -21));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jan 2014 09:34:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-handling-of-file-Path/m-p/543778#M687000</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2014-01-02T09:34:18Z</dc:date>
    </item>
  </channel>
</rss>

