tFileList exclude mask

One Star

tFileList exclude mask

Hi, Is it possible to use more than one tFileList exclude mak and how could I do that if possible?
One Star

Re: tFileList exclude mask

Since the exclude fileMask is a regular expression, you can write your exclude filemask like this :
"(*.txt)|(*.pdf)|(*.doc)"

it should exclude txt, pdf and doc files (for example).
Note : I wrote a java regular expression, but the filemask is waiting for a Glob regular expression. Since I don't know theses expressions, I can't certify the syntax.
One Star

Re: tFileList exclude mask

Works perfectly, thanks a lot!
Edit: that was a little too fast, in fact it doesn't work! Thanks anywa for your help, but the topic is still opened
One Star

Re: tFileList exclude mask

I checked it : the idea was correct but not the syntax Smiley Wink
Here is the good method with a java job :
1) uncheck the "use glob regular expression checkbox" (basic settings)
2) in "filemask", put a single line ".*" (the default "*" filemask does not compile when "glob expression" are desactivated). Of course, this pattern can be replaced by another (and by more than one line), but with a JAVA regular expressions (".+\\.wav" to allow the wav files, for example).
3) in "exclude filemask", this is the good syntax to exclude txt, doc and pdf files :
"(.+\\.txt)|(.+\\.pdf)|(.+\\.doc)"

I tested it in a real Talend job and it works.
If I have some time, I will modify the tFileList component to allow a list of glob exclude patterns (they are easier to write).
One Star

Re: tFileList exclude mask

Ok, thanks a lot and by the way, a list of glob exclude masks would be great!
Diane
One Star

Re: tFileList exclude mask

Ok, thanks a lot and by the way, a list of glob exclude masks would be great!
Diane

It's done !
You can try this component : http://www.talendforge.org/exchange/tos/extension_view.php?eid=164
One Star

Re: tFileList exclude mask

Great I didn't check my posts for a while, thanks a lot
One Star

Re: tFileList exclude mask

I looked into the generated source code:
for (String excludefilemaskEach_tFileList_1 : excludefilemask_tFileList_1.split(",")) {}

It gives a hint for the correct glob exclude syntax:
"*.txt,*.pdf,*.doc"

Of course, I tested it and it works. ;-)
One Star

Re: tFileList exclude mask

Hi,
Thank, the good way to exclude file is with comma : "(myexcludedfile.*),(myotherexcludedfile.*)"
One Star

Re: tFileList exclude mask

You dont need the brackets "(" around it. This works:
"000*,001*"

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

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now