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 / Create flow to share: ...
Power Automate
Answered

Create flow to share: delete files in a specific subfolder, with exceptions

(0) ShareShare
ReportReport
Posted on by 136

Hello,

 

I'm trying to build a flow that I need a few people in my organization to use.

I would like the rule to
- delete files only in a specific folder (the path should be the same for everyone, OneDrive Root \ Specific Folder Name
- delete files that are older than X days
- do not delete any image files (I'm cool with just excluding a few specific formats, we don't get fancier than png/jpg
- I'd like to log the information somewhere but that part I think I have already


I have found a template that does the deletion part, but I don't know how to specify exceptions:
Microsoft Power Automate
I'm also not sure if I can hardcode the folder path, or should I just set it up with the users manually for the proper folder.

I don't expect anyone to write the whole thing 🙂 But any help in setting up exceptions would be appreciated.

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,535 Super User 2026 Season 1 on at

    Hi @julis ,

     

    To answer your first question: yes, you can hardcode the folder.

     

    For the second question: When you are using the template, the condition action does not allow you to add multiple conditions without using the advanced editor. However, if you delete that action and then add another condition action, you can add multiple conditions:

    BCBuizer_1-1696887799751.png

     

     

  • julis Profile Picture
    136 on at

    Is it really that simple as "does not end with"? I was so sure I needed something much more complicated, thank you so much!

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard