Count files

Hi, I have to loop through few folders, get files inside todays folders and than if file name contains “FILE_” then it counts them.

the write line is giving wrong number.


You have to keep adding the number in If condition

fileCount = fileCount +1

Where do I write this?

Just before your fileCount Assign take one more assign in if

But it gives me number 76 and in the folder there is only 1. Maybe because I’m looping through folders (year/month/day/) and there are folders before current year with moths and days and files??

Yes. You are looping through all the folders.

To loop through only one folder you have to pass the same relative path.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.