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 / 2021 SharePoint - Dele...
Power Automate
Unanswered

2021 SharePoint - Deleting Files In Folder After X Days

(0) ShareShare
ReportReport
Posted on by 42

Hello, I am struggling to get files deleted in specific folders after 90 days. I looked at similar posts but they used an "Advance Condition", which I could not find on the current version of SharePoint. Is there a way to implement this feature? If so, please show a step-by-step procedure. 

 

What I tried doing, but it didn't work

IceQueen_0-1623362302969.png

 

Categories:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @IceQueen 

    Thank you for posting.

    Due to the software update, there is no Advance Condition now, You could use expression on both sides of Condition to achieve your needs.

    I have tested it on my side and it can delete the file that 14 days after modified in the folder. You can change 14 to 90.

    Please refer to as below:

    v-LilyW-msft_0-1623388613302.png

    The Expression on the left of Condition:formatDateTime(item()?['Modified'],'yyyy-MM-dd')

    The Expression on the left of Condition:formatDateTime(addDays(utcNow(),-14),'yyyy-MM-dd')

    v-LilyW-msft_1-1623388613309.png

    After Flow runs. The file ‘master student list’ will be deleted.

    v-LilyW-msft_2-1623388613313.png

    v-LilyW-msft_3-1623388613316.png

    Hope the content above may help you.

    Best Regards

    Lily

  • tobrien1 Profile Picture
    10 on at

    Is there a way to set it up so that it can exclude a specific file or folder?

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