SPFileCollection foler = pdflibrary.RootFolder.Files;
Above code line will only give files outside folder. How can get all files inside and outside folder into
SPFileCollection. What is the easiest way.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Use the following code snippet:
var query = new SPQuery(); query.Folder = pdflibrary.RootFolder; query.ViewAttributes = "Scope=\"Recursive\""; var listItems = list.GetItems(query);