[resolved] Can a tFileCopy component to search for a wildcard filename?

Five Stars

[resolved] Can a tFileCopy component to search for a wildcard filename?

I have a file that has a date appended to the end of it. So in this example, it would be test_20110415.txt. Is it possible for the filename to be a wildcard? The file exists and it should pick it up. Thanks.
I can't attach a picture of the tFileCopy component, but under filename I have: "/u02/test/test_*.txt"

Accepted Solutions
Highlighted
One Star

Re: [resolved] Can a tFileCopy component to search for a wildcard filename?

I dont think that will work...
try using a tFileList and provide file mask as test_*.txt , then pass this file name fetched by tFileList to u r tFileCopy Component.
(String)globalMap.get("tFileList_1_CURRENT_FILEPATH"); will contain the full path with fileName

All Replies
Highlighted
One Star

Re: [resolved] Can a tFileCopy component to search for a wildcard filename?

I dont think that will work...
try using a tFileList and provide file mask as test_*.txt , then pass this file name fetched by tFileList to u r tFileCopy Component.
(String)globalMap.get("tFileList_1_CURRENT_FILEPATH"); will contain the full path with fileName
Five Stars

Re: [resolved] Can a tFileCopy component to search for a wildcard filename?

It works! Thanks for your help Ashu.
Employee

Re: [resolved] Can a tFileCopy component to search for a wildcard filename?

Hello txvincent,
Thank you for your feedback.
Best,
Pcoffre.

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

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