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: 
koushik_btech20
Creator
Creator

Count of Folder

I have an working folder path, which I have taken in a variable in script part. Now I have to count the no of folder inside the folder dynamically.I can count the no of files  inside a folder dynamically but I am unable to count no of folder inside the working folder.If anyone have any solution please share here.

1 Reply
miikkaqlick
Partner - Creator II
Partner - Creator II

Hi!

Create qvw and add this to script:

directory;

for each dir_name in DirList('*')

Files:

    load
   FileName() as File,
   FilePath() as Path,
   1 as koe
     from $(dir_name)\*.qvw ;

NEXT;

Save qvw to your working folder. It'll give you every directory. Then you just have slice name out of path and Count(Disctinct)

Br,

Miikka

Climber Finland