SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to SharePoint server. I need to get the list of all document stored in SharePoint server, not in particular user site. Is there any way to get all documents list , name or count using C#?


share|improve this question

Are you wanting to find the documents in the entire farm? The way SharePoint is organized, each Library is basically an autonomous unit. The Search functionality is the only feature OOB that seems like it would work for this task without a lot of coding, but if you could get a way to loop through all the libraries in all the sites in all the site collections in a web application I think you would be doing OK. Scoping it up to EVERY web application in your farm might be a little tougher for you.

Recommendation: Start looking at CAML searching and see if that does anything for you. Otherwise pick a web application and loop through its various sub-components and get your information that way. There's also a web part made by FireArrow software that might be useful - the List Integrator. It can conglomerate multiple different libraries from different site collections together and give you different output. No I don't work for them or anything but it's been a pretty big hit at my company.

share|improve this answer
I have founded following link (…) which is very usefull. Yes i just founded out that SharePoint protect document library at its highest priority. So i'll try with the REST Interface. – A.P.S May 13 '13 at 8:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.