
One thing that you often need and that is quite annoying to get in a default SharePoint installation is the total number of files in a document library and all of its sub-folders. The most common advice is to open the explorer view and then navigate through the folders and add up the file totals, but this becomes tedious really quickly if you have a library with numerous files and folders. Another option is to write a PowerShell script, but then you need to be on the SharePoint server itself and with an account that doesn’t have access to the document libraries. Also, in the case of PowerShell, you’ll quickly become annoyed with the many bad script examples out there that don’t work and end up taking your time. Continue reading “Get the Total Number of Documents in a SharePoint Site Collection Library and its Sub Folders using .NET”