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 / Get Sharepoint Folder ...
Power Automate
Answered

Get Sharepoint Folder Size

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

  • Ctodorut Profile Picture
    2 on at

    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.

  • Verified answer
    v-litu-msft Profile Picture
    Microsoft Employee on at

    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.

  • rjack Profile Picture
    188 on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard