Mar 29 2023 09:12 AM
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.
Apr 04 2023 10:55 AM
I've actually done a exact blog post about this last weekend
Long story short, you can trigger a flow when the end of a retention label is reached. from this you can get the folder and see it's empty.
I go abit more in detail here:
https://yourmodernworkplace.com/blog/How-to-delete-Empty-folder-after-Retention-Policy