<?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: Changing a file extension from list in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298066#M70573</link>
    <description>&lt;P&gt;I found a solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// File (or directory) with old name
File oldfile = new File(((String)globalMap.get("tFileList_4_CURRENT_FILEPATH")));

// File (or directory) with new name
File newfile = new File(((String)globalMap.get("tFileList_4_CURRENT_FILEPATH")).replace(((String)globalMap.get("tFileList_4_CURRENT_FILEEXTENSION")), "xml"));

// Rename file (or directory)
boolean success = oldfile.renameTo(newfile);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jun 2018 12:26:38 GMT</pubDate>
    <dc:creator>RA6</dc:creator>
    <dc:date>2018-06-19T12:26:38Z</dc:date>
    <item>
      <title>Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298059#M70566</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a directory which contain several xml files and 1 file with (.tmp) extension.&lt;/P&gt; 
&lt;P&gt;I am trying to rename or replace the toTest.tmp to toTest.xml using a tfilelist and a tjava.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture6.JPG" style="width: 555px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LySt.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156116i7FFDF3ABCEB9B388/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LySt.jpg" alt="0683p000009LySt.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture4.JPG" style="width: 766px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ly6y.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128150iF6C5101526B46D5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ly6y.jpg" alt="0683p000009Ly6y.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My tfilelist:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.JPG" style="width: 465px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LyT3.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152350iB10144727A989CA6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LyT3.jpg" alt="0683p000009LyT3.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My tjava codes:&lt;/P&gt; 
&lt;PRE&gt;((String)globalMap.get("tFileList_3_CURRENT_FILE")).replace(((String)globalMap.get("tFileList_3_CURRENT_FILEEXTENSION")), "xml");&lt;/PRE&gt; 
&lt;P&gt;The job is ending without error but&amp;nbsp;the file renaming is not taking place.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can you suggest please?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:05:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298059#M70566</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2024-11-16T08:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298060#M70567</link>
      <description>&lt;P&gt;use tflieCopy&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 13:31:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298060#M70567</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-18T13:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298061#M70568</link>
      <description>&lt;P&gt;Normally, in my case, i cannot use tfilecopy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please advice how can i do this achieve this using tfilelist and tjava please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 13:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298061#M70568</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2018-06-18T13:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298062#M70569</link>
      <description>using tjava is not the best way.
&lt;BR /&gt;using tjava is like coding in java.
&lt;BR /&gt;talend is easy to update if it's visual.
&lt;BR /&gt;
&lt;BR /&gt;if you want to use tjava go to a java forum.</description>
      <pubDate>Mon, 18 Jun 2018 14:11:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298062#M70569</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-18T14:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298063#M70570</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsaeAAC"&gt;@xdshi&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Since, there is a component in talend named "tjava", i have&amp;nbsp;tried to use it.&lt;BR /&gt;I have posted my job example in the previous post. Can someone tell me what is wrong please?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 14:33:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298063#M70570</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2018-06-18T14:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298064#M70571</link>
      <description>&lt;P&gt;You tJava seems incomplete and as mentionned by&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKpMAAW"&gt;@fdenis&lt;/A&gt;&amp;nbsp;this is not the best way as soon as you have a component to do&amp;nbsp;what you expect.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 14:43:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298064#M70571</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-06-18T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298065#M70572</link>
      <description>globalMap.put("newFileName",((String)globalMap.get("tFileList_3_CURRENT_FILE")).replace(((String)globalMap.get("tFileList_3_CURRENT_FILEEXTENSION")), ".xml");
&lt;BR /&gt;
&lt;BR /&gt;but tjava is to use only if you cannot do by an other way.</description>
      <pubDate>Mon, 18 Jun 2018 14:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298065#M70572</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2018-06-18T14:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298066#M70573</link>
      <description>&lt;P&gt;I found a solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;// File (or directory) with old name
File oldfile = new File(((String)globalMap.get("tFileList_4_CURRENT_FILEPATH")));

// File (or directory) with new name
File newfile = new File(((String)globalMap.get("tFileList_4_CURRENT_FILEPATH")).replace(((String)globalMap.get("tFileList_4_CURRENT_FILEEXTENSION")), "xml"));

// Rename file (or directory)
boolean success = oldfile.renameTo(newfile);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 12:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298066#M70573</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2018-06-19T12:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298067#M70574</link>
      <description>&lt;P&gt;Hi @Rohit Aftab​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm facing the same issue to change the file extension and i've tried this code in tjava. However, i'm getting error saying that "File cannot be resolved to a type"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you face the same error before or no? Do you have any idea about this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 05:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298067#M70574</guid>
      <dc:creator>SR2210</dc:creator>
      <dc:date>2020-12-01T05:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a file extension from list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298068#M70575</link>
      <description>&lt;P&gt;Please try importing "java.io.File" &lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 18:09:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Changing-a-file-extension-from-list/m-p/2298068#M70575</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2020-12-07T18:09:20Z</dc:date>
    </item>
  </channel>
</rss>

