Fetching latest files from multiple folders of FTP location through date in filename

Highlighted
Six Stars

Fetching latest files from multiple folders of FTP location through date in filename

On my ftp location, I have files with filenames like, "Alpha_01_01_2018_to_01_01_2018,csv"

There will be multiple files with those names across different folders here. I need to pick them every day. Today, I need to pick "Alpha_03_10_2018_to_Alpha_03_10_2018.csv" from all the folders there while tomorrow, I'd have to pick "Alpha_04_10_2018_to_04_10_2018.csv"
The date format here is dd_MM_yyyy in filemask.

I tried testing in filemask with 

"Alpha_"+TalendDate.formatDate("dd_MM_yyyy", TalendDate.getCurrentDate())+"*.csv"

but it won't work. I want it to work everyday when put in a windows scheduler, picking latest files from FTP location.

And there is no error from the job when it runs. Can anyone assist with this?

Forteen Stars

Re: Fetching latest files from multiple folders of FTP location through date in filename

Hi 

 

your filename pattern look correct, think the problem in:

There will be multiple files with those names across different folders here.

how You go thru the folder structure? how deep it?

-----------

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads