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 / Delete Sharepoint file...
Power Automate
Unanswered

Delete Sharepoint file after x days

(0) ShareShare
ReportReport
Posted on by 10

I am trying to build a flow that will be setup to remove all files from a sub folder if they are older than 180 days.

 

I have viewed multiple solved guides all with no success.

The flows seem to succeed, however no action is taken each time.

Current flow:

Screenshot 2023-06-06 112738.png

Though I have built this to have filters on the Get files query to ```Created lt'addDays(utcNow(), -180)```

The expression in the condition is 

Dillon2_0-1686015005068.png

After I run the flow I get the below:

Dillon2_1-1686015068411.png

 

Indicating it was successful, but nothing happens.

Categories:
I have the same question (0)
  • Botaverse Profile Picture
    90 on at

    Hi mate, The expression still shows 180 in positive, can you double check that

  • Dillon2 Profile Picture
    10 on at

    Cheers!

    Good pickup, updated the expression:

    Dillon2_0-1686022991017.png

    same result I'm afraid.

  • Botaverse Profile Picture
    90 on at

    can you check the format for file created date, because UtcNow() is having date with timestamp, i believe it will work if both are in same format.

  • Dillon2 Profile Picture
    10 on at

    Hey,

    I decided to go back to super basics, and see if anything would work, even without filters or conditions, so I removed this, and put in a compose action on the identifier:

    Dillon2_0-1686024402426.png


    Even this shows no results.

    I think I have located part of the issue when going deeper into my file structure.
    It seems that I may be hitting a limit in the number of items, as there are a few thousand files, 

    Dillon2_1-1686024883334.png


    In this case I am moving newer files into a new folder (those created in the past 3 months) and then doing a bulk delete of the folder, and setting up the rule from scratch.

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard