See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More
( 7 months ago )

Create folder and subfolder in SharePoint 2013 using php

General Tech Bugs & Fixes
Max. 2000 characters

Liza Sain


( 7 months ago )


You can create folders and subfolders using the Lists web service using the UpdateListItems method. The following example code takes a foldername argument and creates a folder in the root folder of the list. If you want to create a folder within another folder then just change the RootFolder attribute to the url of the folder. Hope this helped.

public static void UpdateListItemCreateFolder(string folderName)
        listservice.Lists listProxy = new listservice.Lists();

        string xmlconst = "<Batch OnError='Continue' 
RootFolder='http://basesmcdev2/sites/tester1/tester2'><Method ID='1' 
Cmd='New'><Field Name='ID'>New</Field><Field Name='FSObjType'>1</Field>
<Field Name='BaseName'>!@foldername</Field></Method></Batch>";

        listProxy.Url = 
        listProxy.UseDefaultCredentials = true;

        XmlDocument doc = new XmlDocument();
        string xmlFolder = xmlconst.Replace("!@foldername", folderName);
        XmlNode batchNode = doc.SelectSingleNode("//Batch");
        XmlNode resultNode = listProxy.UpdateListItems("tester2", 

Rahul Chaudhary


( 7 months ago )

I am a fresher and want to use SharePoint 2013 with php. What I really want to do is create folders, sub-folders and write .xlsx files inside these folders and also want to read and download these files using php. can anyone help me? I only understand PHP and java-script.

what's your interest