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 / Auto Delete One Drive ...
Power Automate
Unanswered

Auto Delete One Drive Files

(0) ShareShare
ReportReport
Posted on by

Hello.  I'd like some help in figuring out how to build a flow that checks the age of files in a OneDrive folder and deletes whatever is older that a time I can define.  Anyone?  Seems like that should be simple enough, but I'm just not that savvy.

Categories:
I have the same question (0)
  • AlanPs1 Profile Picture
    2,471 on at

    Hi @TechNichols 

    I was looking at this a little the other day and here is what I found:

    {
     "Id": "01XVAUD2JGAL2WPD2EDZFL6LLPOBKH7MV6",
     "Name": "Document.docx",
     "NameNoExt": "Document",
     "DisplayName": "Document.docx",
     "Path": "/Temp-DoNotRemove/Document.docx",
     "LastModified": "2019-02-11T10:37:52Z",
     "Size": 10987,
     "MediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
     "IsFolder": false,
     "ETag": "\"{67F50226-448F-4A1E-BF2D-6F70547FB2BE},3\"",
     "FileLocator": "01XVAUD2JGAL2WPD2EDZFL6LLPOBKH7MV6",
     "LastModifiedBy": "AlanPs1"
     }

    Regards the above code, this is the JSON from the metadata. This is true for both OneDrive and OneDrive for Business.

    You will see a property for LastModified": "2019-02-11T10:37:52Z

    There is no CreatedDate so you could use either of the following to access LastModified and to do a comparison on it's date. This tends to do the trick I find!

    Capture-153.png

    If you have found my post helpful, please mark thumbs up.

    If this post has solved your problem, please click "Accept as Solution".

    Any other questions, just ask.

    Thanks, Alan

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard