Recursive Folder Creation method for SharePoint
public static class SPFolderExtensions { /// <summary> /// Ensure SPFolder /// </summary> /// <param name="web"></param> /// <param name="listTitle"></param> /// <param name="folderUrl"></param> /// <returns></returns> public static SPFolder CreateFolder(this SPWeb web, string listTitle, string folderUrl) { if (string.IsNullOrEmpty(folderUrl)) { throw new ArgumentNullException("folderUrl"); } var list = web.Lists.TryGetList(listTitle); return CreateFolderInternal(list, list.RootFolder, folderUrl); } /// <summary> /// Creates the folder internal. /// </summary> /// <param name="list">The list.</param> /// <param name="parentFolder">The parent folder.</param> ...