<?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: Deleting folders which are empty in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Deleting-folders-which-are-empty/m-p/2373504#M136220</link>
    <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;I would use one tFileList to iterate directory, and use another tFileList to iterate files  in the current direcotry (including the sub-directory). There is a global variable ((Integer)globalMap.get("tFileList_1_NB_FILE")) that counts the total number of files found, if it is 0, means the directory is empty. The job looks like:&lt;/P&gt;&lt;P&gt;tFileList--iterate--tRunJob&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tRunJob: call the child job, and pass current directory path to child job, please refer to&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root" alt="https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root" target="_blank"&gt;https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;child job:&lt;/P&gt;&lt;P&gt;tFileList--iterate--tJava&lt;/P&gt;&lt;P&gt;|runIf--tFileDelite&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set the condition of runIf as:&lt;/P&gt;&lt;P&gt;((Integer)globalMap.get("tFileList_1_NB_FILE")) ==0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try and let me know if it works. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 05:04:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-06T05:04:42Z</dc:date>
    <item>
      <title>Deleting folders which are empty</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Deleting-folders-which-are-empty/m-p/2373503#M136219</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I've a requirement to delete all the folders and sub-folders which are empty i.e folders with out files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with this tFilelist --&amp;gt; tFileExist --&amp;gt; tFileDelete with their respective global variables but nothing worked for me and workaround please suggest me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:44:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Deleting-folders-which-are-empty/m-p/2373503#M136219</guid>
      <dc:creator>Talend_ent</dc:creator>
      <dc:date>2024-11-16T01:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting folders which are empty</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Deleting-folders-which-are-empty/m-p/2373504#M136220</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;I would use one tFileList to iterate directory, and use another tFileList to iterate files  in the current direcotry (including the sub-directory). There is a global variable ((Integer)globalMap.get("tFileList_1_NB_FILE")) that counts the total number of files found, if it is 0, means the directory is empty. The job looks like:&lt;/P&gt;&lt;P&gt;tFileList--iterate--tRunJob&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tRunJob: call the child job, and pass current directory path to child job, please refer to&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root" alt="https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root" target="_blank"&gt;https://help.talend.com/reader/HavZ1pLN5PZ~FuTJY51TEQ/root&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;child job:&lt;/P&gt;&lt;P&gt;tFileList--iterate--tJava&lt;/P&gt;&lt;P&gt;|runIf--tFileDelite&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set the condition of runIf as:&lt;/P&gt;&lt;P&gt;((Integer)globalMap.get("tFileList_1_NB_FILE")) ==0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try and let me know if it works. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 05:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Deleting-folders-which-are-empty/m-p/2373504#M136220</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-06T05:04:42Z</dc:date>
    </item>
  </channel>
</rss>

