Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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#?

Thanks

share|improve this question
add comment

1 Answer

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 (blogs.msdn.com/b/sharepointdev/archive/2011/05/24/…) 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
add comment

Your Answer

 
discard

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.