Hello.
I have a sharepoint library with around 50+ folders (bad practice i know, but i inherited this setup)
I need to create a solution that delete all files that are older than 3 months. Personally, i thought SharePoint Compliance Center had an Out of the box feature to manage this, but they dont want to get involved).
I have written a Power Automate Flow that get me all the files that are less than 90 days
addDays(utcNow(), -90)
This works fine.
I then created an apply to each then a Delete Action as below
However, its asking me to Choose a file to delete. How i can dynamically get it to delete the ID of the file(s) i got in the previous step?
Bearing in mind, this delete file action needs to go through each folder, sub folder and delete the files?
@victorcp how would you extend this to also delete sub-folders?
Thank you Victor. I cant beleive i missed that. I was using the ID column. I didnt see the identifier.
Thanks
Hi,
There is a property called Identifier, use it to delete the file
I hope it helps ๐
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2