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

Community site session details

Session Id : aVQuOZ45iYWOVRZtMyeLNC
Power Automate - Building Flows
Answered

Automatically delete files in Document Library after X days

Like (0) ShareShare
ReportReport
Posted on 28 Dec 2017 22:01:57 by

Hello:

Does anybody know how to create a Flow that identifies specific files in a SharePoint folder, with a condition that 445082 is in the file name, and then delete it from Sharepoint? 

What I have so far:

Capture1.JPGCapture2.JPG

I'm stumped.  It looks like it wants me to specify a file to delete, but, I've already done so in the conditions section?  How do I delete files that match the condition?  Thanks!!

 

I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on 29 Dec 2017 at 16:40:56
    Re: Automatically delete files in Document Library after X days

    This worked great!  Thank you so much!  Man Happy

  • v-xida-msft Profile Picture
    on 29 Dec 2017 at 06:06:42
    Re: Automatically delete files in Document Library after X days

    Hi @mwolf222,

     

    Do you want to delete the file if the file name contains “445082” when a new file is created in a SharePoint library?

    Or delete all files whose file name contains “445082” within a SharePoint library?

     

    If you want to delete the file whose file name contains “445082” when a new file is created, please take a try with the following workaround:5.jpg

    Note: Within “Delete file” action, specify Site Address, File Identifier field set to File identifier dynamic content of the trigger.

     

    The flow works successfully as below:6.jpg

     

    If you want to delete all files whose file name contains “445082” within a SharePoint library, please take a try with the following workaround:7.JPG

    Note: Within “Delete file” action, specify Site Address, File Identifier field set to identifier dynamic content of “Get files (properties only)” action.

     

    The flow works successfully as below:8.JPG

     

    Best regards,

    Kris

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete