Create Folder in Document Library Programmatically



SPDocumentLibrary _MyDocLibrary = (SPDocumentLibrary)_MyWeb.Lists["Library Name Here"];
                SPFolderCollection _MyFolders = _MyWeb.Folders;
                _MyFolders.Add(_MyDocLibrary.RootFolder.ServerRelativeUrl + "/" + ListItemID + "/");              
                _MyDocLibrary.Update();

Comments

Popular posts from this blog

This content database has a schema version which is not supported in this farm

Export all documents/Folders permissions to CSV using SharePoint PowerShell

SPUtility.js