<?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: Loop through Directory files in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302042#M74072</link>
    <description>ok, I have a text file which has list of folder names, I want to make sure those folder still exists in directory.
&lt;BR /&gt;I want to look at text file, loop through directory folder and add missing folder to list of array.
&lt;BR /&gt;text file looks like ;
&lt;BR /&gt;0001
&lt;BR /&gt;0002
&lt;BR /&gt;0003
&lt;BR /&gt;0004
&lt;BR /&gt;Directory folders look like:
&lt;BR /&gt;0001
&lt;BR /&gt;0002
&lt;BR /&gt;0004
&lt;BR /&gt;I want to list missing folder which is 0003.
&lt;BR /&gt;Thanks,</description>
    <pubDate>Fri, 15 Jul 2016 13:57:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-07-15T13:57:21Z</dc:date>
    <item>
      <title>Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302040#M74070</link>
      <description>Hi ,
&lt;BR /&gt;I want to compare a list from text file to directory folder name using tLoop.
&lt;BR /&gt;would like to put list in array where folder is missing in a directory. so from below example- 00003 is missing and want to put this into array until I complete looking into directory and then print message
&lt;BR /&gt;for example: text file data looks like: 00001, 00002 ,00003
&lt;BR /&gt;&amp;nbsp;and directory folder: 00001
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00002
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00004
&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks,</description>
      <pubDate>Thu, 14 Jul 2016 18:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302040#M74070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-14T18:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302041#M74071</link>
      <description>Hello&amp;nbsp;
&lt;BR /&gt;I don't understand your problem well, however, you can use tFileList to iterate all files or folders in a specified directory, there are some global variables that store the current file name or file path are available on this component.&amp;nbsp;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 15 Jul 2016 07:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302041#M74071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-15T07:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302042#M74072</link>
      <description>ok, I have a text file which has list of folder names, I want to make sure those folder still exists in directory.
&lt;BR /&gt;I want to look at text file, loop through directory folder and add missing folder to list of array.
&lt;BR /&gt;text file looks like ;
&lt;BR /&gt;0001
&lt;BR /&gt;0002
&lt;BR /&gt;0003
&lt;BR /&gt;0004
&lt;BR /&gt;Directory folders look like:
&lt;BR /&gt;0001
&lt;BR /&gt;0002
&lt;BR /&gt;0004
&lt;BR /&gt;I want to list missing folder which is 0003.
&lt;BR /&gt;Thanks,</description>
      <pubDate>Fri, 15 Jul 2016 13:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302042#M74072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-15T13:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302043#M74073</link>
      <description>Hello&amp;nbsp;
&lt;BR /&gt;You need to do an inner job on tMap and get the reject lines which are the missing folders, the job looks like:
&lt;BR /&gt;tFileInputDelimited--main--tMap---main--&amp;gt;tlogrow
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lookup
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |
&lt;BR /&gt;&amp;nbsp;tFileList--iterate--tfixedFlowInput--main--tUnite
&lt;BR /&gt;tFileInpuDelimted: read the text file
&lt;BR /&gt;tFileList: iterate all the folders
&lt;BR /&gt;tfixedFlowInput: generate the current folder name using the global variable&amp;nbsp;((String)globalMap.get("tFileList_1_CURRENT_FILE"))
&lt;BR /&gt;About how to do an inner join and get unmatched rows, please refer to this 
&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=190513450" target="_blank" rel="nofollow noopener noreferrer"&gt;article&lt;/A&gt;.
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 18 Jul 2016 08:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302043#M74073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T08:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302044#M74074</link>
      <description>Thanks for your help on this.&lt;BR /&gt;I would like to use tLoop and Global variable to achieve this.&lt;BR /&gt;Please help.</description>
      <pubDate>Tue, 19 Jul 2016 13:58:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302044#M74074</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-19T13:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302045#M74075</link>
      <description>List your directories in a text file and read it using tFileInputDelimited; you only have one column.
&lt;BR /&gt;Connect this to tFlowToIterate, and then iterate to tJava. You can perform any initialisation you want in the tJava.
&lt;BR /&gt;tFileInputDelimited_1(row1)-&amp;gt;tFlowToIterate_1(Iterate)-&amp;gt;tJava_1
&lt;BR /&gt;Unfortunately, you can't natively create a directory with Talend, so you need to touch a file in the (new) directory (and create directory if it does not exist). You can then remove the file.
&lt;BR /&gt;From tJava_1(OnSubJob)-&amp;gt;tFileTouch_1(OnSubJobOK)-&amp;gt;tFileDelete_1</description>
      <pubDate>Tue, 19 Jul 2016 14:12:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302045#M74075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-19T14:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302046#M74076</link>
      <description>thanks for quick reply.
&lt;BR /&gt;So my tFileInputDelimited has list of directory. and my directory has a list of folders
&lt;BR /&gt;for example: text file data looks like: 00001, 00002 ,00003,00004,00005
&lt;BR /&gt;&amp;nbsp;and directory folder: 00001, 00002, 00005
&lt;BR /&gt;I want to put 0003 and 0004 into a list of array since these two are missing folders in directory structure.</description>
      <pubDate>Tue, 19 Jul 2016 14:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302046#M74076</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-19T14:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302047#M74077</link>
      <description>I thought I had it and you lost me ;-)
&lt;BR /&gt;A directory is a folder.
&lt;BR /&gt;In my example, I did forget to include the important test tFileExists_1 to see if the directory exists, before creating it.
&lt;BR /&gt;If you want to list the directories rather than create, connect tFileExists(NotExists)-&amp;gt;tJava and use System.out.println() to print them.
&lt;BR /&gt;If you really need then in an array, add them in tJava.</description>
      <pubDate>Tue, 19 Jul 2016 15:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302047#M74077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-19T15:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302048#M74078</link>
      <description>I Had a multiple Records in the Input ( Customer ID, Name, Amount) and I want to Display the output like "If their is any same customer ID's and I want&amp;nbsp; to print the all the Amounts in One Record, is That Possible if it Is which function Can I Use in Data Mapper?&amp;nbsp;</description>
      <pubDate>Tue, 19 Jul 2016 17:20:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302048#M74078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-19T17:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through Directory files</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302049#M74079</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;I Had a multiple Records in the Input ( Customer ID, Name, Amount) and I want to Display the output like "If their is any same customer ID's and I want&amp;nbsp; to print the all the Amounts in One Record, is That Possible if it Is which function Can I Use in Data Mapper?&amp;nbsp;&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Hi,
&lt;BR /&gt;Could you provide us with an input file example and the expected output file ?
&lt;BR /&gt;Eric</description>
      <pubDate>Sat, 27 Aug 2016 08:37:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Loop-through-Directory-files/m-p/2302049#M74079</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2016-08-27T08:37:08Z</dc:date>
    </item>
  </channel>
</rss>

