Five 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

1 ACCEPTED SOLUTION

Accepted Solutions
Eleven 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
6 REPLIES
Eleven Stars

Re: Multiple use of TfileList

As I said you can delete old file using tftpdelete in tPostgresqloutput job.
Manohar B
Eleven 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
Five 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!

Eleven 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
Eleven Stars

Re: Multiple use of TfileList

@daez,still do you have issue?

Manohar B
Eleven Stars

Re: Multiple use of TfileList

@daez,Please provide Kudos also.

Manohar B