Delete Folders in Sharepoint Library folders

Delete Folders in Sharepoint Library folders using Object Model

using (SPSite oSite = new SPSite(SPContext.Current.Site.ID)) { using (SPWeb mySite = oSite.OpenWeb()) { SPSecurity.RunWithElevatedPrivileges(delegate() { mySite.AllowUnsafeUpdates = true; SPList list = mySite.Lists[“MeetingPointAttachments”]; for (int i = 0; i < list.RootFolder.SubFolders.Count; i++) { try { SPFolder folder = list.RootFolder.SubFolders[i]; if (folder.ItemCount…

Bitnami