1 Reply Latest reply: Sep 12, 2014 7:37 AM by Miikka Koskinen RSS

    Count of Folder

    Koushik Banerjee

      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.

        • Re: Count of Folder
          Miikka Koskinen

          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