cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kpr1983
New Member

Creating a flow that will delete folders in sharepoint with a specific file size

Hello. I am new to power automate and I am learning. I need your expert help please. I found many solutions online and flows that will delete sharepoint files automatically. However, I haven't found a way to add an extra requirement for the file to get deleted. What I'm looking for is to create a flow that will delete sharepoint files that are under a specific size, example 10 KB. Any help would be appreciated. Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @Kpr1983 

 

Thank you for posting.

 

According to your description, you would like to delete files from SharePoint based on file size. If any misunderstanding, please kindly let me know.

 

We can achieve it using condition action, here is the flow for your reference:

Expression:

div(outputs('Get_file_metadata')?['body/Size'],1024)

v-duann-msft_0-1616727241958.png

 

Once tested, all files deleted if size smaller than 10KB.

v-duann-msft_1-1616727241971.png

 

v-duann-msft_2-1616727241974.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

3 REPLIES 3
v-duann-msft
Community Support
Community Support

Hi @Kpr1983 

 

Thank you for posting.

 

According to your description, you would like to delete files from SharePoint based on file size. If any misunderstanding, please kindly let me know.

 

We can achieve it using condition action, here is the flow for your reference:

Expression:

div(outputs('Get_file_metadata')?['body/Size'],1024)

v-duann-msft_0-1616727241958.png

 

Once tested, all files deleted if size smaller than 10KB.

v-duann-msft_1-1616727241971.png

 

v-duann-msft_2-1616727241974.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

Thanks 

Thank you for your help.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (65,715)