SP 2007 Data Retention Policy does not include empty folders RRS feed

  • Question

  • I am running SP 2007 with a data retention policy set for 5 days on a site.  Every 5 days it deletes the files but does not delete the folders.  Is there a way to make it include the folders?  I've tried to come up with API solutions but nothing is very elegant.  If there is not a way to include the folders, how can I delete the empty folders left behind by the policy?



    • Moved by Mike Walsh FIN Thursday, May 5, 2011 1:19 PM not a customization question (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Thursday, May 5, 2011 11:18 AM


  • Hey courtknee,

    I have to throw this out there; have you considered getting rid of folders and replacing them with meta data? This is generally considered best practice. 

    There.. now that is out of the way. I would probably suggest a creating a simple timer job or even a console application scheduled to run every 5 days that would look for empty folders and delete them. 

    Good luck!


    • Marked as answer by David HM Friday, May 13, 2011 1:35 AM
    Thursday, May 5, 2011 12:52 PM