You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hello,
My job use several file types: txt, archive or Excel. It must be able to automatically detect if it's an archive or an Excel file.
Sometimes files have an extension ". Txt" then it's archive ...
Is there a component Talend to detect this?
Otherwise how JAVA can I use?
Thank you,
Carole
Offline

Hi
Link tFileProperties with tFilterRow.
Check "Advanced mode" of tFilterRow.
Set expression of basename.
Get extension at the right of "." .
(input_row.basename.substring(StringHandling.INDEX(input_row.basename,".")+1)).equals("txt")Regards,
Pedro
Offline

Hi Carole
There isn't a component equivalent to "file -i".
You can only use tFileProperties to get the basename of each file.
And use tFilterRow or tMap to filter the extension.
Regards,
PEDRO
Offline
Pages: 1