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 / 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

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