I try to make a flow for Delete files in OneDrive older than 60 day`s with this example.
But for this point:
3-1. Action: Data Operations - Compose ( Inputs = "@div(sub(ticks(utcnow()), ticks(item()?['LastModified'])), 864000000000)" )
i can`t put it in the expression box, it gives a error.
Is there an other example to make a flow for Delete files in OneDrive older than xx day`s?
Hi @v-bacao-msft @ScottShearer
If i set that files older than 3 day`s must be beleted is delets file`s from 01-05-2019 -02-05-2019 and 03-05-2019
Hi @frixel ,
You can initialize an array to store information about the filtered files.
Use Length() function to calculate the number of files, or you could create an HTML table to display file information.
Image reference:
Please take a try.
Best Regards,
Can I ask one more question?
If I want to receive 1 mail when files have been deleted, how do I set it?
If I do it like the below, flow sent an email for each deleted file.(it would be even better if flow counts how many files have been deleted.)
Ahh,sorry. I forget to "update" the addDays(utcNow) expression
Now it works fine.
What happened, it should only delete the eligible files according to the conditions you set.
When i do this al the files wil be deleted
Hi @frixel ,
Please use Compose output Last modified and Is folder.
Please show the details of your Flow configuration.
Best Regards,
WarrenBelz
146,513
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,606
Most Valuable Professional