Not sure if this will do *exactly* what you want, but you can configure Microsoft Exchange to clean out the public folders automatically by setting an age limit on the contents.
1)Open Microsoft Exchange System Manager
2)Expand `Administrative Groups?
3)Select the required administrative group -> `Servers?
4)Click on the Server and then click on the required Storage Group
5)Expand `Public Folder Store?
6)Click on `Public Folder Instances?
7)Right-click on the public folder you want to modify and select `Replica Properties?
8)Enable `Age Limit of this folder on this public store (days);’
9)Enter the number of days that you want to keep the public folder contents (anything older will be automatically deleted)
10)Click OK to apply the changes