If you need an immediate response, please create a support ticket or contact our support team by email at [email protected].
I'm trying to create a project to determine how many files are in each folder. I have a folder with around 50 sub folders that contain files. Is there a way for me to loop through each folder and count the files in each folder? I can't seem to create a list of folders.
Creating a File list (createFileList) will allow you to point to the root folder, then add a Recursive view. This will traverse all folders (below the root) and return a list of files. An optional variable is the Number of files found. This will give you the TOTAL number of files (in all folders).
To separate by sub-folder, you would have to loop through (forEach) the FileList variable and check for a change in the file attribute "parentFile" (This is the current folder of each file as you loop through.) Create a counter and then you would have the number of files in each folder.
Another way is to use a Folder List. This is detailed with a Forum Post Here.
Creating your folder list would allow you to loop through that rowset of Folder Names, then do a CreatFileList inside each folder to generate the number of files in each.
There are other options as well ... these are just a couple.
Lead Solutions Consultant