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 ,
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.
Best Regards,
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?
Hi @frixel ,
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.
Best Regards,
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
Hi @frixel ,
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.
Best Regards,
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.
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,
WarrenBelz
146,660
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional