Kurkula
Kurkula

Reputation: 6762

Sharepoint webservice rename a folder

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();

Upvotes: 1

Views: 355

Answers (1)

Nikolay
Nikolay

Reputation: 12235

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

Upvotes: 1

Related Questions