Find Duplicate Documents in SharePoint 2010 using SPSiteDataQuery
SPSiteDataQuery query = new SPSiteDataQuery(); query.Webs = "<Webs Scope='SiteCollection' />"; //query all web sites in site collection query.Lists = "<Lists ServerTemplate='101' Hidden='FALSE' MaxListsLimit='0' />"; query.Query = string.Empty; query.Query = "<Where><Eq><FieldRef Name='FileLeafRef' /><Value Type='File'>" + lblDocumentName.Text + "</Value></Eq></Where>"; query.ViewFields = _viewFields; ...