web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to construct a ...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by 12

 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. 

Categories:
  • Verified answer
    v-yuazh-msft Profile Picture
    Microsoft Employee on at

    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

  • scoombs Profile Picture
    12 on at

    Thank you Alice.  Your solution works great. 

     

     

  • Chaitanya81IT Profile Picture
    4 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 288 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard