Not applicable

FTP A FILE BASED ON LASTMODIFIED DATE

Hi all,
we want to ftp some files which are most recently modified (or modified on that particular day)from one location to another .how to get the most recently modified filesin tftpput through tfileproperties.
Thanks and Regards,
--Koustubh Avadhani
5 REPLIES
Community Manager

Re: FTP A FILE BASED ON LASTMODIFIED DATE

Hi
I show a similar example job in topic:
http://www.talendforge.org/forum/viewtopic.php?id=3184
Hope it will be helpful for you.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: FTP A FILE BASED ON LASTMODIFIED DATE

Hi
use tFileList to iterate the files. On each iterate save the tFileProperties to a file( append). Once done you can do a sort row on the file based on the time from tFileProperties. Take the first file.
tFileList--iterate--tFileProperties---tFileOutputDelimited
tFileOutputDelimited--tSortRow--tSampleRow(for select first file)--
Not applicable

Re: FTP A FILE BASED ON LASTMODIFIED DATE

Hi ,
Thanks Shong
The article u gave was very helpful . i was able to get the most recently modified date but i am not able to get those files in a tftpput component file and i have a list of files not a single file which are modified on the same day.So i want all these which are most recently modified to be copied to a server through tftpput.
Thanks Lijolawrance
we will try your suggestion as well but the only problem is i have a list of files which are modified on that particular day and i need all those files with that particular.

Thanks and Regards,
--Koustubh Avadhani
Not applicable

Re: FTP A FILE BASED ON LASTMODIFIED DATE

Hi Shong,
Please find the screenshot of our job below.we have two files named Mortgage and Morgage123 but only one file is copied to the target destination not both.
Thanks and Regards,
--Koustubh Avadhani
Community Manager

Re: FTP A FILE BASED ON LASTMODIFIED DATE

Hi
You can copy the list of files which are recently modified to a folder and use the tFileList to iterate each one and upload it to ftp server, for example:
.....get the files which are recently files and put them into a folder.
|
onsujobok
|
tFileList--iterate--tFTPPut
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business