Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

koushik_btech20
Contributor

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.

Tags (1)
1 Reply
miikkaqlick
Contributor II

Re: Count of Folder

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

Community Browser