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 / [PAD] File.Size proper...
Power Automate
Answered

[PAD] File.Size property error

(0) ShareShare
ReportReport
Posted on by 4

Hi Guys,

 

======CONTEXT=======

I have an indexing app that is working in the background. I needed some kind of identification that says when the indexing is done.

 

I've prepared a flow that checks all files in the folder (FileList) > counts total file size (FolderSizeA) > repeats last step (FolderSizeB) > compares if A is not equal B > if true, then it means that the indexing is still in progress and files are getting bigger > if false, then it means that folder size is still equal and indexing finished.

 

farb_2-1710584629457.png

 

======ERROR======

It always works for a couple of items but sometimes it gives me this error: Property 'Size' of variable 'File' couldn't be evaluated.

 

Correlation Id: d0074118-27d8-44f0-8a37-9bf6be8dd556

 

farb_0-1710584549398.png

 

farb_1-1710584574570.png

 

=====QUERIES=====

 

  1. Any idea what might be causing this issue?
  2. Can you somehow count folder size so I don't have to loop through each file?
  3. Do you think of a better solution to identify if the indexing is still running?

Thanks!

  • CU05081807-0 Profile Picture
    4 on at

    PS: Is it possible that the FileSize value is just too big for the variable? Would converting the number to text help?

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I would recommend using the Run PowerShell script action and using an appropriate script to get the size of all files within a folder. It's quite simple and straightforward. See this article for reference on how to do that: https://www.makeuseof.com/calculate-folder-size-powershell/

     

    Note that after running it from PAD, it will be returned as a string, and usually with an extra newline at the end, so if you want to use it as a numeric value, you will need to use Trim text on it first and then Convert text to number.

     

    As for the reason why this happens to you, I would assume it might fail to check the size of a file if data is being written to a file at a time when PAD tries to check it. But that's just a guess. It shouldn't have problems with large files.

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
11manish Profile Picture

11manish 275 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 235

#3
David_MA Profile Picture

David_MA 178 Super User 2026 Season 2

Last 30 days Overall leaderboard