<?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: tfilefetch and file extension in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345760#M113243</link>
    <description>Hi 
&lt;BR /&gt;Link tFileProperties with tMap. 
&lt;BR /&gt;Set expression of basename. 
&lt;BR /&gt;Get extension at the right of "." . 
&lt;BR /&gt; 
&lt;PRE&gt;row1.basename.substring(StringHandling.INDEX(row1.basename,".")+1)&lt;/PRE&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Pedro</description>
    <pubDate>Tue, 06 Mar 2012 09:48:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-03-06T09:48:35Z</dc:date>
    <item>
      <title>tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345757#M113240</link>
      <description>Hi,&lt;BR /&gt;is there a way to get the file extension (.jpeg, .gif, .bmp for exemple) of a file fetched with a tfilefetch component ?&lt;BR /&gt;Thanks&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 05 Mar 2012 11:37:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345757#M113240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-05T11:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345758#M113241</link>
      <description>Hi
&lt;BR /&gt;You can't get extension from tfilefetch directly.
&lt;BR /&gt;But you may save it into local disk and use tFileProperties to get extension.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 06 Mar 2012 02:18:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345758#M113241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T02:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345759#M113242</link>
      <description>tFileProperties gives :
&lt;BR /&gt;- abs_path
&lt;BR /&gt;- dirname
&lt;BR /&gt;- basename
&lt;BR /&gt;- mode_string
&lt;BR /&gt;- size
&lt;BR /&gt;- mtime
&lt;BR /&gt;- mtime_string
&lt;BR /&gt;
&lt;BR /&gt;==&amp;gt; where is the file extension property please ?
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 06 Mar 2012 09:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345759#M113242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T09:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345760#M113243</link>
      <description>Hi 
&lt;BR /&gt;Link tFileProperties with tMap. 
&lt;BR /&gt;Set expression of basename. 
&lt;BR /&gt;Get extension at the right of "." . 
&lt;BR /&gt; 
&lt;PRE&gt;row1.basename.substring(StringHandling.INDEX(row1.basename,".")+1)&lt;/PRE&gt; 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 06 Mar 2012 09:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345760#M113243</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T09:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345761#M113244</link>
      <description>I dont think it works, because the file name is defined in the tFileFetch component (property "destination Filename"), it is not fetched directly from the URI.... 
&lt;BR /&gt;I would have be nice if this "destination filename" property was not mandatory, so the file extension would have been fetched from the URI... 
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 06 Mar 2012 10:39:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345761#M113244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345762#M113245</link>
      <description>Hi, 
&lt;BR /&gt;You can create an arborescence depending on your URI (checkbox). I don't know if your URIs have different arborescence, but if not you could use it to get the name of the file. Furthermore I don't know how your job is designed, but you could also try to put your URI in a context variable and use this context to get what you want. Can you post a screenshot of your job?</description>
      <pubDate>Tue, 06 Mar 2012 10:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345762#M113245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T10:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345763#M113246</link>
      <description>Try to fetch for example : 
&lt;A href="http://gallica.bnf.fr/ark:/12148/btv1b22002053/f2.thumbnail" rel="nofollow noopener noreferrer"&gt;http://gallica.bnf.fr/ark:/12148/btv1b22002053/f2.thumbnail&lt;/A&gt; 
&lt;BR /&gt;and automatically find out its extension (.jpg ? .gif ? .pdf ?).... 
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 06 Mar 2012 11:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345763#M113246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T11:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345764#M113247</link>
      <description>How do you get your URI? If  your URI comes from a context variable, it's quite simple to get the extension by using row.substring(context.myvariable.lastIndexOf('.')).</description>
      <pubDate>Tue, 06 Mar 2012 12:44:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345764#M113247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T12:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345765#M113248</link>
      <description>Hi, 
&lt;BR /&gt;This is not as easy as it might seem in my opinion. Having a URI with an extension like .jsp doesn't mean the file you receive is of type jsp (whatever that may be), it could as well be an image that is send back. (How should the job know that the URI " 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCrKzCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/tfilefetch-and-file-extension/td-p/115056&lt;/A&gt;" returns an HTML page for example?) 
&lt;BR /&gt;I don't know how to solve this, it's just that I don't think just looking for a . in a URI is enough to really solve this problem. 
&lt;BR /&gt;Maybe interpretation of the retrieved content is necessary to determine content type and therefor a possible extension, I don't know... 
&lt;BR /&gt;Best regards, 
&lt;BR /&gt;Arno</description>
      <pubDate>Tue, 06 Mar 2012 13:08:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345765#M113248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T13:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345766#M113249</link>
      <description>Hi,&lt;BR /&gt;Obviously it depends on what you are looking for. So what's the use of the job, It will help.</description>
      <pubDate>Tue, 06 Mar 2012 14:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345766#M113249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-06T14:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345767#M113250</link>
      <description>I dont understand your question, I think all is in previous posts....
&lt;BR /&gt;The aim of my job is very simple: fetch a file from an URI (see URI example in previous post) and get the extension of the file (pdf or jpeg for example).
&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 07 Mar 2012 06:13:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345767#M113250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-03-07T06:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: tfilefetch and file extension</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345768#M113251</link>
      <description>String fileName = input_row.fileName; 
&lt;BR /&gt;globalMap.put("fileName", row1.fileName); 
&lt;BR /&gt; 
&lt;BR /&gt;if (row1.fileName.startsWith("Sample")){ 
&lt;BR /&gt;System.out.println((String)row1.fileName); 
&lt;BR /&gt;} 
&lt;BR /&gt;I'm using this code to get the excel file and convert it to pdf. 
&lt;BR /&gt;Now I wanted to get all the xlsx file in my directory by not using the filename of the excel file but by it's file type. Do you have any idea? 
&lt;BR /&gt;Thanks!</description>
      <pubDate>Tue, 04 Aug 2015 08:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tfilefetch-and-file-extension/m-p/2345768#M113251</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-08-04T08:38:23Z</dc:date>
    </item>
  </channel>
</rss>

