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

count the number of files in a folder

Hi,
I would like to count the number of files in a specific folder .

which component do i have to use and which way 


thank you in advance for your help

Labels (2)
5 Replies
Anonymous
Not applicable
Author

Hi,
You can use tFileList --(Iterate)--> tIterateToFlow --(Main)-->tLogRow.
In tIterateToFlow Mapping, set the value ((Integer)globalMap.get("tFileList_1_NB_FILE")).
Best regards, May T.
Anonymous
Not applicable
Author

Sorry my request was incomplete. I don't want to count all the files into a folder but count all the files containing a unique reference.
For example these 9 files:

0683p000009MDcs.png
I was thinking to build a job like that:

0683p000009MDcx.png
But that can't work because of the Iterate .
The value of ((Integer)globalMap.get("tFilterRow_7_NB_LINE_OK")) is 1 and not 9 0683p000009MPcz.png
Anonymous
Not applicable
Author

Or I was thinking to copy all the files after the tFilterRow in a specific folder, reuse another tFileList and use the variable: tFileList_x_NB_FILE.
But this require a lot of components and maybe there is a simpliest way to achieve this count ?
Anonymous
Not applicable
Author

Hi,
Do you have any idea in order to acheive my goal in my previous post plz ?
_AnonymousUser
Specialist III
Specialist III

Hi,
You can use a filemask in the tFileList component to filter with a specific pattern.
Did you try this option?
Sunil