<?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: Advanced filtering with tFileList in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260928#M41879</link>
    <description>Well you do a tFileList only on file without .old extension right after you do a tFileExist to test if yourFileName+".old" exists in the folder. If Yes you get the files if not you proceed to the next file...</description>
    <pubDate>Thu, 15 Jul 2010 00:45:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-07-15T00:45:48Z</dc:date>
    <item>
      <title>Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260923#M41874</link>
      <description>Hi everybody, 
&lt;BR /&gt;I am newbie with Talend and English is not my native language ... 
&lt;BR /&gt;Each minute (using tInfiniteLoop), i would like to list files from a directory but only retrieve files respecting functionnal requirements (a file can only be retrieve if it exists its equivalent in .old. For example the file A.xml will only be retrieve if B.xml.old also exists). 
&lt;BR /&gt;So i think that Filemask and Exclude Filemask of tFileList component are not enough to do the job. 
&lt;BR /&gt;I try to do the job using tJavaFlex but it does not work. 
&lt;BR /&gt;Example of code : 
&lt;BR /&gt;&amp;lt;Start Code&amp;gt; 
&lt;BR /&gt;File dir = new File("D:/Works/InfoServer-Phase2/Input"); 
&lt;BR /&gt;FilenameFilter filenameFilter = new FilenameFilter() { 
&lt;BR /&gt; public boolean accept(File file, String name) { 
&lt;BR /&gt; return name.endsWith(".xml"); 
&lt;BR /&gt; } 
&lt;BR /&gt;}; 
&lt;BR /&gt;List&amp;lt;File&amp;gt; Files = new ArrayList&amp;lt;File&amp;gt;(); 
&lt;BR /&gt;for (File f:dir.listFiles(filenameFilter)) 
&lt;BR /&gt; Files.add(f); 
&lt;BR /&gt; 
&lt;BR /&gt;int nbFile=0; 
&lt;BR /&gt; 
&lt;BR /&gt;&amp;lt;Main Code&amp;gt; 
&lt;BR /&gt;for (File f:Files){ 
&lt;BR /&gt; String currentFileName = f.getName(); 
&lt;BR /&gt; String currentFilePath = f.getAbsolutePath(); 
&lt;BR /&gt; String currentFileDirectory = f.getParent(); 
&lt;BR /&gt; String currentFileExtension = null; 
&lt;BR /&gt; if (f.getName().contains(".")&amp;amp;&amp;amp; f.isFile()) { 
&lt;BR /&gt; currentFileExtension = f.getName().substring(f.getName().lastIndexOf(".") + 1); 
&lt;BR /&gt; } else { 
&lt;BR /&gt; currentFileExtension = ""; 
&lt;BR /&gt; } 
&lt;BR /&gt; nbFile++; 
&lt;BR /&gt; globalMap.put("tJavaFlex_1_CURRENT_FILE", 
&lt;BR /&gt; currentFileName); 
&lt;BR /&gt; globalMap.put("tJavaFlex_1_CURRENT_FILEPATH", 
&lt;BR /&gt; currentFilePath); 
&lt;BR /&gt; globalMap.put("tJavaFlex_1_CURRENT_FILEDIRECTORY", 
&lt;BR /&gt; currentFileDirectory); 
&lt;BR /&gt; globalMap.put("tJavaFlex_1_CURRENT_FILEEXTENSION", 
&lt;BR /&gt; currentFileExtension); 
&lt;BR /&gt; globalMap.put("tJavaFlex_1_NB_FILE", 
&lt;BR /&gt; nbFile); 
&lt;BR /&gt;} 
&lt;BR /&gt;Rem : It was a test so FilenameFilter is quite easy &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; 
&lt;BR /&gt;My design is so: 
&lt;BR /&gt;tInfiniteLoop -------iterate-------&amp;gt; tJavaFlex (with code above) --------iterate---------tXSLT (using ((String)globalMap.get("tJavaFlex_1_CURRENT_FILEPATH")) 
&lt;BR /&gt;So my idea was to simlulate, using tJavaFlex, the behavior of a tFileList component. 
&lt;BR /&gt;Thanks in advance for your analyse and your helps &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Sat, 16 Nov 2024 13:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260923#M41874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260924#M41875</link>
      <description>Hi
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;(a file can only be retrieve if it exists its equivalent in .old. For example the file A.xml will only be retrieve if B.xml.old also exists).&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Sorry, I don't understand your requirements well.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 14 Jul 2010 10:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260924#M41875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T10:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260925#M41876</link>
      <description>hi all,&lt;BR /&gt;Do you want to compare the name of file, the content ??&lt;BR /&gt;If you want to simulate a tFileList with tjavaFlex have a look at the of it ?&lt;BR /&gt;(view-&amp;gt;talend-&amp;gt;codeviewer and choice start,main,end,all in the right menu)&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
      <pubDate>Wed, 14 Jul 2010 10:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260925#M41876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T10:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260926#M41877</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi&lt;BR /&gt; 
     &lt;BLOCKQUOTE&gt; 
      &lt;TABLE border="1"&gt; 
       &lt;TBODY&gt; 
        &lt;TR&gt; 
         &lt;TD&gt;(a file can only be retrieve if it exists its equivalent in .old. For example the file A.xml will only be retrieve if B.xml.old also exists).&lt;/TD&gt; 
        &lt;/TR&gt; 
       &lt;/TBODY&gt; 
      &lt;/TABLE&gt; 
     &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Sorry, I don't understand your requirements well.&lt;BR /&gt;Best regards&lt;BR /&gt;Shong&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Sorry shong, it seems that my requirements are not clear enough. 
&lt;BR /&gt;From a directory, i would like to list all the xml file having an associated .old file. 
&lt;BR /&gt;For e.g if directory contains following files 
&lt;BR /&gt;A.xml 
&lt;BR /&gt;A.xml.old 
&lt;BR /&gt;B.xml 
&lt;BR /&gt;C.xml 
&lt;BR /&gt;C.xml.old 
&lt;BR /&gt;I only want to get A.xml and C.xml files because B.xml has not related .old (B.xml.old) file 
&lt;BR /&gt;How can i achieve this ? (Exlude) Filemask of tFileList component can not help me to fullfill the complete filtering i need. So i think about creating a special component with tJavaFlex and simulate what tFileList does but with a more possible complexe filtering (like explain above) 
&lt;BR /&gt;I hope its is more clear now &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks for your interest and your help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 14 Jul 2010 20:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260926#M41877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T20:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260927#M41878</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;hi all,&lt;BR /&gt;Do you want to compare the name of file, the content ??&lt;BR /&gt;If you want to simulate a tFileList with tjavaFlex have a look at the of it ?&lt;BR /&gt;(view-&amp;gt;talend-&amp;gt;codeviewer and choice start,main,end,all in the right menu)&lt;BR /&gt;regards&lt;BR /&gt;laurent&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;In fact i want to compare the name of the files and the "relation" between them like i explain here above to shong
&lt;BR /&gt;Thanks for this trick, it can help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 14 Jul 2010 21:01:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260927#M41878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-14T21:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260928#M41879</link>
      <description>Well you do a tFileList only on file without .old extension right after you do a tFileExist to test if yourFileName+".old" exists in the folder. If Yes you get the files if not you proceed to the next file...</description>
      <pubDate>Thu, 15 Jul 2010 00:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260928#M41879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-15T00:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced filtering with tFileList</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260929#M41880</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Hi&lt;BR /&gt;
     &lt;BLOCKQUOTE&gt;
      &lt;TABLE border="1"&gt;
       &lt;TBODY&gt;
        &lt;TR&gt;
         &lt;TD&gt;(a file can only be retrieve if it exists its equivalent in .old. For example the file A.xml will only be retrieve if B.xml.old also exists).&lt;/TD&gt;
        &lt;/TR&gt;
       &lt;/TBODY&gt;
      &lt;/TABLE&gt;
     &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Sorry, I don't understand your requirements well.&lt;BR /&gt;Best regards&lt;BR /&gt;Shong&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Sorry shong, it seems that my requirements are not clear enough.
&lt;BR /&gt;From a directory, i would like to list all the xml file having an associated .old file.
&lt;BR /&gt;For e.g if directory contains following files
&lt;BR /&gt;A.xml
&lt;BR /&gt;A.xml.old
&lt;BR /&gt;B.xml
&lt;BR /&gt;C.xml
&lt;BR /&gt;C.xml.old
&lt;BR /&gt;I only want to get A.xml and C.xml files because B.xml has not related .old (B.xml.old) file
&lt;BR /&gt;)
&lt;BR /&gt;Just use tfilelist to select "*.old" files.
&lt;BR /&gt;Then just strip with string operation the trailing .old from the variable returned by tfilelist...</description>
      <pubDate>Thu, 15 Jul 2010 14:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Advanced-filtering-with-tFileList/m-p/2260929#M41880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-07-15T14:28:05Z</dc:date>
    </item>
  </channel>
</rss>

