Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Talend Helpers,
May you please help me for getting the current file from directory. Lets see the scenario
In Directory we have below files.
ACBACKLOG2017QTR1-RUNDT-FEB152017.txt
ACBACKLOG2016QTR4-RUNDT-FEB252017.txt
ACBACKLOG2016QTR3-RUNDT-FEB252017.txt
ACBACKLOG2016QTR2-RUNDT-FEB182017.txt
ACBACKLOG2016QTR1-RUNDT-FEB182017.txt
We need to create a logic to pic only current file. Here we have ACBACKLOG2017QTR1-RUNDT-FEB152017.txt as latest file, because its having latest 2017 QTR 1 data.
Also need to make sure that we have already processed previous file before picking the latest one.
Thanks
GopsK
"ACBACKLOG"+TalendDate.formatDate("yyyy",TalendDate.getCurrentDate())+"QTR"+((Integer.valueOf(TalendDate.formatDate("MM",TalendDate.getCurrentDate()))-1)/3+1)+"*.txt"