Announcements
Hi,
What goes wrong in my Flow to delete files older than 4 days?
As it stands now, some files (not all just 20 files) from 06-05-2019 (and also 07-05-2019) will be deleted.
I think there is something in the flow order of the flow error?
Hi @frixel ,
It seems that this is the method I provided. I observed the configuration of your Flow, which is no problem with logica and it does delete the file with Last Modified Date as 06-05-2019.
If you mean that it have not been able to delete the file with Last Modified Date as 07-05-2019, Please check the folder for eligible files.
I am not sure what your problem is now, please provide more details.
Best Regards,
Hi @v-bacao-msft
I mean that files older than 4 days (addDays (utcNow (), - 04, 'yyyy-MM-dd')) must be deleted.
But if the flow is running then it has cleaned up files from more than 4 days old.
Yesterday it was 15-05-2019 and the files of 11-05-2016 (-4 days) should be deleted but he cleans up files from 06-05-2019 and 07-05-2019.
Thank you for your reply, I understand what you mean now, you just want to delete the file for that day.
Please replace is less than with is equal to in Condition.
No it must be deleted all files older then 4 days ahead.
I test it again, and yes it deletes well files older then 4 day`s, so that is oke.
But......
If there are 60 files in a folder to clean up (older than 4 days), it cleans up 12 files and leaves the rest.If I run the flow again, it clears up 4 files.So it is a different number every time instead of cleaning all files
The parameter used here to determine is Last Modified Time. This value will change all the time, as long as the file has any changes.
It is different from Create time and will not change once it is generated. This is a noteworthy place.
The logic of the Flow configuration is no problem.
So I cannot adjust the flow to use the created date to clean up?
If that is indeed not possible, how is it possible with Flow to clean up files older than 4 days?
Unfortunately, the file information currently obtained from OneDrive or OneDrive for Business does not include Created Time.
If you want to use a similar feature, please consider storing the file in SharePoint Library.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 262 Super User 2026 Season 1
11manish 167
Haque 154