Multiple use of TfileList

Seven Stars

Multiple use of TfileList

Hello everyone,

 

I'm currently working on a project which need to GET on a FTP the most recent file (Date in filename). Then convert XML to CSV, doing some formatting & PUT it back on FTP. All of this is done by now.

I do need now to delete the oldest file, using the same logic. My question sounds pretty easy but I would like to know if I can use a tricky way on my current project to do that, instead of recreate all the JOB since its just doing the opposite. Tho, i see no possible way to use tFileList sorting twice. 

Here a screenshot of my current job, getting the new file & put it back, working good thanks to @manodwhb Smiley Happy

 

Sans titre.png


Any idea is good to take, Thanks for your precious time


Accepted Solutions
Thirteen Stars

Re: Multiple use of TfileList

Otherway,that you can use tFTPFileDelete after the tFTPPut by using On Component Ok,you can specify the patter like *.XML in tFTPFileDelete.
Manohar B

All Replies
Thirteen Stars

Re: Multiple use of TfileList

As I said you can delete old file using tftpdelete in tPostgresqloutput job.
Manohar B
Thirteen Stars

Re: Multiple use of TfileList

Otherway,that you can use tFTPFileDelete after the tFTPPut by using On Component Ok,you can specify the patter like *.XML in tFTPFileDelete.
Manohar B
Seven Stars

Re: Multiple use of TfileList

@manodwhb Thanks for you answer again.

How can I specify in the tFTPDelete to ONLY delete the oldest files tho? Because *.XML will delete all of my XML files.

Thanks for your help!

Thirteen Stars

Re: Multiple use of TfileList

You can use the same pattern what you used in tFTPGet to delete the file in tFTPDeletefile.
Manohar B
Thirteen Stars

Re: Multiple use of TfileList

@daez,still do you have issue?

Manohar B
Thirteen Stars

Re: Multiple use of TfileList

@daez,Please provide Kudos also.

Manohar B

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.