Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileList exclude mask

Hi, Is it possible to use more than one tFileList exclude mak and how could I do that if possible?
Labels (2)
9 Replies
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

I checked it : the idea was correct but not the syntax 0683p000009MA9p.png
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).
Anonymous
Not applicable
Author

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

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 : https://community.talend.com/t5/Installing-and-Upgrading/Use-tFileInputXML-for-reading-process-lt-jo...
Anonymous
Not applicable
Author

Great I didn't check my posts for a while, thanks a lot
_AnonymousUser
Specialist III
Specialist III

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. 😉
_AnonymousUser
Specialist III
Specialist III

Hi,
Thank, the good way to exclude file is with comma : "(myexcludedfile.*),(myotherexcludedfile.*)"
Anonymous
Not applicable
Author

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