cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

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

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
Highlighted
Community Support
Community Support

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

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

Highlighted
Frequent Visitor

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

Thank you Alice.  Your solution works great. 

 

 

Highlighted
Regular Visitor

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

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
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (6,053)