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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sravanth49
Contributor III
Contributor III

[resolved] tFileList-filemask-regular expression

Hi,

can we include path as well in filemask.

I have some folders with .txt files. I wan't to read the file and insert data into database table. But I don't wan't to read files the from some folders, 
like eg: if the folders has names  lke test_rts,test2_old and 123456, I want to pick the files from 123456.

There are many folders, I want to pick the files from folder, which is named with numbered like 234567,986432 and folder name length should be 6 .

Thanks
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Sravanth,
Use  "+.txt" as filemask in tFileList and select Includes Subdirectories option.
Screenshot for reference
0683p000009MAsj.png
Hope this will help you.

View solution in original post

6 Replies
Anonymous
Not applicable

Hi,
File is picked up from the path provided with the filter in the expression. If your folder name is dynamic and you want to iterate on folders then you need to identify a way to get the folder names may be something similar to below
tFixedFlow-->Iterate-->tFileList-->tFileInput-->youroutput... 
Whether the metadata is same for all the files? If metadata is different, then you need to create different flows based on if clause and read those files based on certain condition.
Thanks
Vaibha
sravanth49
Contributor III
Contributor III
Author

Hi,
My folder structure is like this
d:/temp/
under above directory there are many sub-directories like AB,CD,EF 
d:/temp/AB
d:/temp/CD
d:/temp/EF
under above directory there is a common folder named 'fest'
d:/temp/AB/fest
d:/temp/CD/fest
d:/temp/EF/fest
under above directory there are folders named like this '123456','234567','987654_gfds'
d:/temp/AB/fest/123456
d:/temp/AB/fest/234567
d:/temp/AB/fest/987654_gfds
There are .txt files from above directory, but I want to pick up from the folders '123456','234567'. I want to pick up .txt files from 6 digit folder.
Please do needful help.
Anonymous
Not applicable

Hi Sravanth,
Use  "+.txt" as filemask in tFileList and select Includes Subdirectories option.
Screenshot for reference
0683p000009MAsj.png
Hope this will help you.
sravanth49
Contributor III
Contributor III
Author

Hi Gajwani,
It didn't work
Anonymous
Not applicable

Hi Sravanth,
My understanding mistake as i was working for files
please refer attached screenshot for reference in folder case


0683p000009M7he.png
Hope this will help you
sravanth49
Contributor III
Contributor III
Author

Thanks Manish