
Announcements
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.
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!
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