Posted by Shantha Kumar on 10th July 2009

Retrieve all folders with sub-folders from SharePoint List

In this post, I’ll show you how to get all the folders including subfolders from Document Library or List in sharepoint.
This is just easy, by using SPQuery object and setting ViewAttributes property in it; we can retrieve only the folders from the SharePoint List, with a single condition. Now I’ll show you a code,

SPSite site [...]

Posted by Shantha Kumar on 11th April 2009

Download all files from SharePoint Library

Now, we are going to see how we can download all documents(incluing sub folders) from SharePoint Library.
First of all,we have get all documents from SharePoint Library. The following code help us to get all the documents including Subfolders.
//Get the Document Library and its view
SPList list = web.Lists["Test Document"];
SPView view = list.Views["All Documents"];
//Query all documents in [...]