<?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: Retrieving Latest Files From FTP (Java) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307906#M79298</link>
    <description>hey,&lt;BR /&gt;please i have problem&lt;BR /&gt;my team is working at BI prject  with talend to retrieve data from datasource using ftp servers to another place, please if anyone can help me and tell me how this processus work ??</description>
    <pubDate>Wed, 19 Jan 2011 10:01:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-01-19T10:01:17Z</dc:date>
    <item>
      <title>Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307894#M79286</link>
      <description>I have an FTP account from which I must retrieve the most recent version for four different files. Every day our data source posts four different files with a datestamp appended to the end of the filename... Ex: 
&lt;BR /&gt;idns.txt.11310 
&lt;BR /&gt;lim.txt.11310 
&lt;BR /&gt;sbo.txt.11310 
&lt;BR /&gt;epf.txt.11310 
&lt;BR /&gt;NOTE: The datestamp is mmddyy where mm is a single or double digit, dd is the day, yy is the two-digit year. 
&lt;BR /&gt;If my process does not run for 5 days, I'll end up with 20 files in the directory. 
&lt;BR /&gt;I'm assuming I'll need to use a tFTPFileList and potentially tFileProperties to iterate over all files, but how do I compare datestamps to obtain the 'most recent' version of each of the four file types?</description>
      <pubDate>Sat, 16 Nov 2024 13:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307894#M79286</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2024-11-16T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307895#M79287</link>
      <description>I neglected to mention that I also need to truncate the ".mmddyy" extension upon retrieval to work on the ".txt" files.</description>
      <pubDate>Wed, 13 Jan 2010 20:43:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307895#M79287</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-13T20:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307896#M79288</link>
      <description>Hello Andybrown 
&lt;BR /&gt;Here I show you a demo job, feel free to post your question if you have any trouble. 
&lt;BR /&gt;code on tJavaRow_1: 
&lt;BR /&gt; 
&lt;PRE&gt;//Code generated according to input schema and output schema&lt;BR /&gt;if(input_row.date.length()==5){  //like: 11301&lt;BR /&gt;output_row.basename = input_row.basename;&lt;BR /&gt;output_row.date = TalendDate.parseDate("Mddyy",input_row.date);&lt;BR /&gt;}&lt;BR /&gt;else{ //the length of date is 6, like 111209&lt;BR /&gt;output_row.basename = input_row.basename;&lt;BR /&gt;output_row.date = TalendDate.parseDate("MMddyy",input_row.date);&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;the destination filename on tFIleCopy_1: 
&lt;BR /&gt; 
&lt;PRE&gt;((String)globalMap.get("tFileList_1_CURRENT_FILE")).substring(0,((String)globalMap.get("tFileList_1_CURRENT_FILE")).lastIndexOf("."))&lt;/PRE&gt; 
&lt;BR /&gt;About usage of tFlowToIterate component, see 5827 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 14 Jan 2010 05:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307896#M79288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-14T05:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307897#M79289</link>
      <description>Hi Shong, 
&lt;BR /&gt;I greatly appreciate your time in explaining this to me. It's now perfectly understandable. However, I'm getting the following exception on tFTPFileProperties_1... 
&lt;BR /&gt;====== 
&lt;BR /&gt;Starting job Get_Feed_Files at 06:06 14/01/2010. 
&lt;BR /&gt; connecting to socket on port 3334 
&lt;BR /&gt; connected 
&lt;BR /&gt;Exception in component tFTPFileProperties_1 
&lt;BR /&gt;com.enterprisedt.net.ftp.FTPException: ./lim.txt.11310: file too large for SIZE when TYPE is ASCII. 
&lt;BR /&gt; at com.enterprisedt.net.ftp.FTPControlSocket.validateReply(FTPControlSocket.java:999) 
&lt;BR /&gt; at com.enterprisedt.net.ftp.FTPClient.size(FTPClient.java:1953) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.tFTPFileList_1Process(Get_Feed_Files.java:1792) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.tFTPConnection_1Process(Get_Feed_Files.java:482) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.runJobInTOS(Get_Feed_Files.java:2686) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.main(Get_Feed_Files.java:2522) 
&lt;BR /&gt;578 milliseconds 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;Job Get_Feed_Files ended at 06:06 14/01/2010. 
&lt;BR /&gt;====== 
&lt;BR /&gt;The actual size of the file is just 41,045 bytes (yes, just 41.0 KB). This is happening on both active and passive modes. Any ideas? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;-Andy</description>
      <pubDate>Thu, 14 Jan 2010 14:10:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307897#M79289</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-14T14:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307898#M79290</link>
      <description>Another note... after changing all connection modes to "active" from the initial connection on down, I'm getting this exception: 
&lt;BR /&gt;===== 
&lt;BR /&gt;Starting job Get_Feed_Files at 06:14 14/01/2010. 
&lt;BR /&gt; connecting to socket on port 3742 
&lt;BR /&gt; connected 
&lt;BR /&gt;Exception in component tFTPFileList_1 
&lt;BR /&gt;java.io.IOException: Unexpected null reply received 
&lt;BR /&gt; at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:855) 
&lt;BR /&gt; at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:3089) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.tFTPFileList_1Process(Get_Feed_Files.java:1642) 
&lt;BR /&gt; at mfrget_feed_files_0_1.Get_Feed_Files.tFTPConnection_1Process(Get_Feed_Files.java:482) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.runJobInTOS(Get_Feed_Files.java:2686) 
&lt;BR /&gt; at mfr.get_feed_files_0_1.Get_Feed_Files.main(Get_Feed_Files.java:2522) 
&lt;BR /&gt;1360 milliseconds 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;Job Get_Feed_Files ended at 06:14 14/01/2010. 
&lt;BR /&gt;=======</description>
      <pubDate>Thu, 14 Jan 2010 14:16:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307898#M79290</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-14T14:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307899#M79291</link>
      <description>You have to change the file type in the components setting to Binary from Ascii...</description>
      <pubDate>Thu, 14 Jan 2010 16:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307899#M79291</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-01-14T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307900#M79292</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;You have to change the file type in the components setting to Binary from Ascii...&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Thanks for the response...
&lt;BR /&gt;That was my first guess based on the exception, however there are no options for "Binary | Ascii" in any of the Java FTP controls. There is only 'mode' (passive vs. active).</description>
      <pubDate>Thu, 14 Jan 2010 22:02:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307900#M79292</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-14T22:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307901#M79293</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;however there are no options for "Binary | Ascii" in any of the Java FTP controls. There is only 'mode' (passive vs. active).&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;The option is on tFTPGet component, so now only use tFTPGet to test if you can get the file to local machine. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 15 Jan 2010 02:48:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307901#M79293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-15T02:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307902#M79294</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hello &lt;BR /&gt; 
     &lt;BLOCKQUOTE&gt; 
      &lt;TABLE border="1"&gt; 
       &lt;TBODY&gt; 
        &lt;TR&gt; 
         &lt;TD&gt;however there are no options for "Binary | Ascii" in any of the Java FTP controls. There is only 'mode' (passive vs. active).&lt;/TD&gt; 
        &lt;/TR&gt; 
       &lt;/TBODY&gt; 
      &lt;/TABLE&gt; 
     &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;The option is on tFTPGet component, so now only use tFTPGet to test if you can get the file to local machine.&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;Unfortunately, I am having major issues with the tFTPGet component in retrieving files from my FTP server. I have a ticket open and a WebEx with Tim Drees next week about this. 
&lt;BR /&gt;In the meantime, is there any other way to set the mode to binary in the tFTPFileProperties component, since this is the component raising the exception?</description>
      <pubDate>Fri, 15 Jan 2010 15:36:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307902#M79294</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-15T15:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307903#M79295</link>
      <description>A quick work around would be to use tFtpGet to download the files, do the file check locally (using tFileList) and then send back to another ftpGet which files you want to download.</description>
      <pubDate>Fri, 15 Jan 2010 16:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307903#M79295</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-01-15T16:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307904#M79296</link>
      <description>What I ended up doing is to bring the files down to a temp directory using a tFTPFileList and a tSystem (using a curl command for each file), then iterating over the local files, moving them to my inbound directory. I'll delete the source files both locally and on the FTP server so I only have to process a handful each time. Until my FTP issue is identified, this shall be it.
&lt;BR /&gt;Thanks for the assist.</description>
      <pubDate>Fri, 15 Jan 2010 16:40:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307904#M79296</guid>
      <dc:creator>AndyBrown</dc:creator>
      <dc:date>2010-01-15T16:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307905#M79297</link>
      <description>Would love to check your job out if you're willing to share. Sounds like a good work around...</description>
      <pubDate>Fri, 15 Jan 2010 19:12:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307905#M79297</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-01-15T19:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving Latest Files From FTP (Java)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307906#M79298</link>
      <description>hey,&lt;BR /&gt;please i have problem&lt;BR /&gt;my team is working at BI prject  with talend to retrieve data from datasource using ftp servers to another place, please if anyone can help me and tell me how this processus work ??</description>
      <pubDate>Wed, 19 Jan 2011 10:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieving-Latest-Files-From-FTP-Java/m-p/2307906#M79298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-01-19T10:01:17Z</dc:date>
    </item>
  </channel>
</rss>

