Sharepoint webservice rename a folder

356 Views Asked by At

I am trying to use sharepoint webservice to rename a folder. I tried the below code to create a folder which works fine. But I am unable to find the webmethod related to renaming folder. Any help would be highly appreciated.

Web Service used http://myservicelink:100/_vti_bin/Dws.asmx

 Dws objDws = new Dws();
            objDws.Credentials = System.Net.CredentialCache.DefaultCredentials;

        string strResult = objDws.CreateFolder("MyMainFolders/MyFolder");
        Console.WriteLine(strResult);
        Console.ReadLine();
1

There are 1 best solutions below

0
On

AFAIK there is no way to do it with web services API. But do you really have reasons to use the deprecated web-services API? (one I may think of is, you need to support SharePoint 2007 and below).

The better SharePoint API is called Share Point Client Object Model (CSOM). Here is a blog article explaining basic folder operations:

Manage (Create/Delete/Rename) list folders with SP Client Object Model