cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
EdwardC
Level: Powered On

Checking to see if folder has a file

Hi,

 

I'm trying to build a flow that checks whether or not if different folders has any files in it:

Here.png

 

I'm using the folder size as a condition to check but it always returns false even when I know I have files on that folder. Am I missing something here..??


Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Checking to see if folder has a file

Hi @EdwardC ,

 

You could use List folder action to check if there are any items in the specified folder, including files and folders.

Then configure length() function to determine if any elements are included in Body. If the result is 0, it means that this is an empty folder, which does not contain any files and folders.

Image reference:

18.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Checking to see if folder has a file

Hi @EdwardC ,

 

You could use List folder action to check if there are any items in the specified folder, including files and folders.

Then configure length() function to determine if any elements are included in Body. If the result is 0, it means that this is an empty folder, which does not contain any files and folders.

Image reference:

18.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

EdwardC
Level: Powered On

Re: Checking to see if folder has a file

Thank you, it worked! Still not sure why the folder size is 0 though.. oh well

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,846)