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

Community site session details

Session Id : i5xhG/rVhJT9S69xkHAFM3
Power Automate - Building Flows
Answered

Get Sharepoint Folder Size

Like (0) ShareShare
ReportReport
Posted on 10 Dec 2020 19:23:28 by 2

Hello all,

 

I'm trying to get the overall folder size of a Sharepoint Folder that has files within it. I've tried to "Get Folder Metadata" but it's returning '0' as the folder size. Maybe I'm missing something or there is another way to do this? My goal is to get the overall folder size to set conditions further down the flow. Thanks in advance.

 

Here are my screenshots:

MS Power Automate Example.jpgMS Power Automate Example 1.jpg

  • rjack Profile Picture
    188 on 22 Dec 2022 at 22:59:01
    Re: Get Sharepoint Folder Size

    I know it's an old post, but list folder will list only the 1st level folders. how do we do achieve this for sub sub sub sub folders? deep file tree.

  • Verified answer
    v-litu-msft Profile Picture
    on 14 Dec 2020 at 09:07:09
    Re: Get Sharepoint Folder Size

    Hi @Ctodorut,

     

    You could refer to this Flow to count all files size, and use div() function to convert bytes to MB:

    div(variables('TotalSize'),1000000)

    Screenshot 2020-12-14 170439.jpg

     

    Screenshot 2020-12-14 170456.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Ctodorut Profile Picture
    2 on 11 Dec 2020 at 15:21:31
    Re: Get Sharepoint Folder Size

    Thanks for the response. 

     

    I want to get the overall folder size with every file that lives in it as well. For example, if the folder contains 3 files at 5Mb's each, the overall size would be ~15Mbs.

  • v-litu-msft Profile Picture
    on 11 Dec 2020 at 07:01:41
    Re: Get Sharepoint Folder Size

    Hi @Ctodorut,

     

    The size of the folder metadata is the data size, size of folder in SharePoint all is 0.

     

    Do you mean you want to get the number of files in the folder?

    If so, you could use the List folder action to get all files and subfolder, then use length() function to get it:

    Screenshot 2020-12-11 150113.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete