cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scoombs
Frequent Visitor

Trying to construct a flow that will email the count of files within a Sharepoint Folder.

 Im trying to get a file count on a folder within Sharepoint. I've setup a recurrence schedule to send out email every hour with the total number of objects. This folder is under another folder. The address appears http://mysharepointsite.sharepoint.com/site/IT and a directory called Disaster Recovery under IT.

SharepointFolderTocount.png

Within the Disaster Recovery folder there are five files I would like to count. When I run my flow

FileCount.png

I recieve an email that says File Count: 100. Not sure what I'm missing. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @scoombs,

 

Your flow would get all folders and files count in the library.

If you want to get file count which is in the folder Disaster Recovery, please refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

The expression in the Condition as below:

@and(contains(items('Apply_to_each')?['{Identifier}'], '.'),contains(items('Apply_to_each')?['{Path}'], 'Disaster Recovery'))

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

3 REPLIES 3
v-yuazh-msft
Community Support
Community Support

Hi @scoombs,

 

Your flow would get all folders and files count in the library.

If you want to get file count which is in the folder Disaster Recovery, please refer to screenshot below to create the flow:

Capture.PNG

Capture.PNG

 

The expression in the Condition as below:

@and(contains(items('Apply_to_each')?['{Identifier}'], '.'),contains(items('Apply_to_each')?['{Path}'], 'Disaster Recovery'))

The flow would run successfully as below:

Capture.PNG

 

 

Best regards,

Alice

View solution in original post

Thank you Alice.  Your solution works great. 

 

 

Chaitanya81IT
Regular Visitor

Hi,

 

I tried to create a flow with similar way but file count shows 100.

 

Tried the solution provided by alice using. @And(contains(items('Apply_to_each')?['{Identifier}'], '.'),contains(items('Apply_to_each')?['{Path}'])) but getting invalid expression. I need to count the number of items that include files and folders.

My project is like count number of files in the library when an item is created and once the count is greater or equal to 4700. Need to create a new library with todays date as the name of the library. Then move the files older than 6 months from old library to the new created library.

 

Can anyone help me

 

regards

KCtest.jpg

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,167)