Hello,
I am building a flow to delete files on a SharePoint folder based on the date Last Modified - X Days.
I used the following approach as a guideline: https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Delete-files-older-than-X-days-fro...
However it seems I am getting a wrong output in the LastModified field as per screenshots: "0001-01-01T00:00:00"
Am I using the correct field for this purpose?
Can anyone assist?
Thank you!
Solved: Delete files older than 3 years - Power Platform Community (microsoft.com)
try this
hope this help.
So I replicated that flow, but it doesn't seem to be doing anything:
Were you able to replicate it?
Any ideas?
Hi @Anonymous
Has your problem been solved?
If you want to delete a file based on it's modified date , you can refer to the following screenshots.
I have a folder like this:
Flow in details:
Expression: formatDateTime(items('Apply_to_each')?['Modified'],'yyyy-MM-dd')
Expression: addDays(utcNow(),-7,'yyyy-MM-dd')
After flow runs, the files will be deleted.
Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.
It doesn't seem to work for me. I'm getting that the flow is running successfully, but nothing is getting deleted; I still have files from January...
Not sure what is going on...
User | Count |
---|---|
93 | |
44 | |
21 | |
17 | |
16 |
User | Count |
---|---|
137 | |
50 | |
42 | |
38 | |
29 |