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?

-----------

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog