Forum Discussion

bravery's avatar
bravery
Copper Contributor
Mar 29, 2023

Deleting Folders as part of retention

I have a query about how to delete empty folders after retention policy has been applied.  Some users set up folders in document libraries.  Regardless of whether we apply retention at library or folder level, only the files within the folder will delete at the specified time but the actual (now empty) folder remains.  How can we automatically get SharePoint to delete the empty folder as well as the files with in? I've seen a solution to create a flow but that will delete any empty folder, not just the ones where files have come to the end of their retention. 

Resources