<?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: Rename FolderNames present in Same Directory in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324236#M93967</link>
    <description>&lt;P&gt;Do the folder paths have "_" in them anywhere?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Mar 2018 14:20:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-21T14:20:05Z</dc:date>
    <item>
      <title>Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324220#M93951</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I want to rename Some Folders present in a Directory. Is it possible to achieve in anyway?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 15:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324220#M93951</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-20T15:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324221#M93952</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;can u help please&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 15:44:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324221#M93952</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-20T15:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324222#M93953</link>
      <description>&lt;P&gt;Have you tried using the tSystem component?&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.talend.com/reader/hfF27SBEP9Avc0ofq7IDjw/mdw6s1fJbAlR4WwQQv9PCw" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/hfF27SBEP9Avc0ofq7IDjw/mdw6s1fJbAlR4WwQQv9PCw&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 16:16:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324222#M93953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-20T16:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324223#M93954</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&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;What to give command over there? Basically I have to rename all the folder names in that directory to foldername_Sysdate. Sydate I am getting in the Jobflow. Using Global variable of tflowtoiterate I can get that. But How to rename all the folder names? is it possible?By Java code?&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsaeAAC"&gt;@xdshi&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 16:21:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324223#M93954</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-20T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324224#M93955</link>
      <description>&lt;P&gt;You could always use a tFileList and set it to look for directories, then connect a tJava component and use this code....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;java.io.File dir = new java.io.File(((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")));

String newFolderName = "my_new_folder";

dir.renameTo(newFolderName);&lt;/PRE&gt;&lt;P&gt;You may need to tweak the code (written off the top of my head), but it should kind of work.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2018 16:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324224#M93955</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-20T16:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324225#M93956</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;My New Folder Name will be OldSubFolderName_Old_Date. Plus the last line of code is giving compilation error.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 06:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324225#M93956</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T06:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324226#M93957</link>
      <description>&lt;P&gt;One More thing is happening,&lt;/P&gt;
&lt;P&gt;When I am printing the tfilelist Current File directory in tjava I am seeing it is printing only the Parent Directory Name. But not taking inside Subdirectory Names&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 06:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324226#M93957</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T06:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324227#M93958</link>
      <description>&lt;P&gt;Sorry, this was written quickly without access to try it. I've just tested it and tweaked it for you. This code will work.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;System.out.println(((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")));

java.io.File dir = new java.io.File(((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")));

String newFolderName = ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))+"_"+routines.TalendDate.getDate("yyyyMMddHHmmss");

dir.renameTo(new java.io.File(newFolderName));&lt;/PRE&gt;&lt;P&gt;Keep in mind that I had no idea what you meant by "old date" so I have just added some code to add the current date to the end of the folder names. You will need to adjust that.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 09:38:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324227#M93958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T09:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324228#M93959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;Your solution is working. But only Problem is My Folder is being renamed yesterday is also renaming with today's timestamp. But I dont want to touch earlier folders. I want to rename only folders which created in last Run. I have attached the snapshot how folders are creating. Can You please help&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsVO"&gt;RENAMING.JPG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsJI"&gt;tfilelist.JPG&lt;/A&gt;</description>
      <pubDate>Wed, 21 Mar 2018 12:47:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324228#M93959</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T12:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324229#M93960</link>
      <description>&lt;P&gt;I've made an assumption that your folders will only have a "_" character in them if they have already been renamed. There are better ways of doing this using the date stamp, but this will do. A better way of dealing with this would be to move the folder. Your job will end up taking longer and longer with the more folders you build up in this source folder.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Anyway, this code will stop your previously renamed folders from being renamed again. As I said, you may want to think of better logic than just looking for a "_" character....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;System.out.println(((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")));

if(((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")).indexOf('_')==-1){

	java.io.File dir = new java.io.File(((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")));

	String newFolderName = 	((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))+"_"+routines.TalendDate.getDate("yyyyMMddHHmmss");

	dir.renameTo(new java.io.File(newFolderName));
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Mar 2018 12:57:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324229#M93960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T12:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324230#M93961</link>
      <description>&lt;P&gt;Not working&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MPcz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157233iD1A564EF62DE3BC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MPcz.png" alt="0683p000009MPcz.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 13:11:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324230#M93961</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T13:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324231#M93962</link>
      <description>I tested it and it worked. That is exactly the code I tested. What is not working exactly?</description>
      <pubDate>Wed, 21 Mar 2018 13:21:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324231#M93962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T13:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324232#M93963</link>
      <description>&lt;P&gt;RENAME part&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 13:33:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324232#M93963</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T13:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324233#M93964</link>
      <description>&lt;P&gt;It will rename any flder without a "_" character in it. I've tested that this is the case. Can you give an example of what is not being renamed?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 13:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324233#M93964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T13:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324234#M93965</link>
      <description>Hi 
&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, 
&lt;BR /&gt;Yeah none of the folders are being renamed with the new code. Not even the folders with date timestamp.</description>
      <pubDate>Wed, 21 Mar 2018 13:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324234#M93965</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T13:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324235#M93966</link>
      <description>Hi 
&lt;A href="https://community.qlik.com/s/profile/null"&gt;@rhall&lt;/A&gt;, 
&lt;BR /&gt;With folders being present there still it is unable to rename my folders without timestamp. &lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;. It is iterating perfectly from tFilelist. Printing folderNames. But dont know rename part not happening</description>
      <pubDate>Wed, 21 Mar 2018 13:52:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324235#M93966</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T13:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324236#M93967</link>
      <description>&lt;P&gt;Do the folder paths have "_" in them anywhere?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 14:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324236#M93967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T14:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Rename FolderNames present in Same Directory</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324237#M93968</link>
      <description>Hi 
&lt;A href="https://community.qlik.com/s/profile/null"&gt;@rhall&lt;/A&gt;, 
&lt;BR /&gt;Dont know how to thanku Sir. &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt; Thanks a lot. Your solution worked like charm. &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;</description>
      <pubDate>Wed, 21 Mar 2018 19:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Rename-FolderNames-present-in-Same-Directory/m-p/2324237#M93968</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-03-21T19:27:50Z</dc:date>
    </item>
  </channel>
</rss>

