web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create flow to share: ...
Power Automate
Unanswered

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,505 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard