sharepointdocument-library

Monitoring a SharePoint document library


I was wondering if there was a good way to monitor a document library on SharePoint for changes (new files added, files changed / checked-in, files deleted, etc.)

Basically, what System.IO.FileSystemWatcher does on local / network directories.

Are there events that get fired when documents are uploaded to document libraries?

Perhaps creating a workflow on the document library that fires onCreate / onModify would be better?

Any suggestions are welcome.


Solution

  • Take a look at event receivers for lists/document libraries. There are both synchronous and asynchronous options built into the object model. (ItemAdded, ItemAdding, ItemUpdated, ItemUpdating ... and so on.)

    The following site should give you a good start: http://www.davehunter.co.uk/Blog/Lists/Posts/Post.aspx?List=f0e16a1a%2D6fa9%2D4130%2Dbcab%2Dbaeb97ccc4ff&ID=69