Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SharePoint: How to create a folder in a document library please using web services

I need to create a simple folder in a document library in SharePoint, but I can't seem to find a scrap of documentation on the subject.

The dws webservice seems to be used to create physical folders in a workspace, I need a way to create a folder in a document library.

Not sure what to do , please help

like image 718
JL. Avatar asked Nov 17 '25 19:11

JL.


1 Answers

I found this method to work :

    HttpWebRequest request = (System.Net.HttpWebRequest)HttpWebRequest.Create("http://mySite/MyList/MyfolderIwantedtocreate");
    request.Credentials = CredentialCache.DefaultCredentials;
    request.Method = "MKCOL";
    HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
    response.Close();
like image 152
JL. Avatar answered Nov 20 '25 12:11

JL.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!