<?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: Count files in local in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304464#M76234</link>
    <description>&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code line is exactly I need it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I need to use for other path (aws) it's possible to modify that code line???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 17:52:40 GMT</pubDate>
    <dc:creator>EmmanuelTrejo</dc:creator>
    <dc:date>2022-06-01T17:52:40Z</dc:date>
    <item>
      <title>Count files in local</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304462#M76232</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm developing a job with a java component to get total numbers of files in a specific path.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lines of code are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;File&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;carpeta&lt;/P&gt;&lt;P&gt; = &lt;/P&gt;&lt;P&gt;new&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;File&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;"E:\\Documentación"&lt;/P&gt;&lt;P&gt;); &lt;/P&gt;&lt;P&gt;File[] lista = carpeta.listFiles();    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int&lt;/P&gt;&lt;P&gt; cuenta=&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;for&lt;/P&gt;&lt;P&gt; (&lt;/P&gt;&lt;P&gt;int&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;i&lt;/P&gt;&lt;P&gt; = &lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;; i &amp;lt; lista.length; i++) &lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;if&lt;/P&gt;&lt;P&gt; (lista[i].isFile())&lt;/P&gt;&lt;P&gt;           cuenta++;&lt;/P&gt;&lt;P&gt;  System.out.println(&lt;/P&gt;&lt;P&gt;"\n Hay "&lt;/P&gt;&lt;P&gt; +  cuenta + &lt;/P&gt;&lt;P&gt;" archivos"&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The job is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Riq8XAAR.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/145432i9617AFBF4942A3CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Riq8XAAR.png" alt="0695b00000Riq8XAAR.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the code i change to read according tFileList_1 configuration&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 18:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304462#M76232</guid>
      <dc:creator>EmmanuelTrejo</dc:creator>
      <dc:date>2022-05-27T18:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count files in local</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304463#M76233</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;You don't need to hard code on tJava to get the counts of files are found in the specific path.   Just use tFileList to get the file list and use the global variable. &lt;/P&gt;&lt;P&gt;tFileList&lt;/P&gt;&lt;P&gt;|onsubjob&lt;/P&gt;&lt;P&gt;tJava&lt;/P&gt;&lt;P&gt;on tJava:&lt;/P&gt;&lt;P&gt;int file_counts=((Integer)globalMap.get("tFileList_1_NB_FILE"));&lt;/P&gt;&lt;P&gt;System.out.println(file_counts);&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>Mon, 30 May 2022 03:54:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304463#M76233</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-30T03:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count files in local</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304464#M76234</link>
      <description>&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code line is exactly I need it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I need to use for other path (aws) it's possible to modify that code line???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 17:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304464#M76234</guid>
      <dc:creator>EmmanuelTrejo</dc:creator>
      <dc:date>2022-06-01T17:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count files in local</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304465#M76235</link>
      <description>&lt;P&gt;@Emmanuel Trejo​&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I don't understand your question well, other path(aws)? which code line?&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, 02 Jun 2022 06:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304465#M76235</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-02T06:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Count files in local</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304466#M76236</link>
      <description>&lt;P&gt;It does not matter what the location is (local or AWS etc.), as long as you are using the tFileList you can use the Global Variables. The easiest way to do it, is to go to the Outline (bottom left in the Studio) and drag the required variable into your tJava component. In this case you would need the "&lt;B&gt;Number of files - NB_FILE (Flow)&lt;/B&gt;".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000RjH9DAAV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146024i08BA928547CEB369/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000RjH9DAAV.png" alt="0695b00000RjH9DAAV.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 09:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Count-files-in-local/m-p/2304466#M76236</guid>
      <dc:creator>SMR040</dc:creator>
      <dc:date>2022-06-02T09:52:42Z</dc:date>
    </item>
  </channel>
</rss>

