/// <summary> /// Delete the file with specified URL /// </summary> /// <param name="destinationSPFolder">The destination SP folder.</param> /// <param name="fileName">Name of the file.</param> public void DeleteFile(string destinationSPFolder, string fileName) { using (WSFiles.Files fileProxy = new WSFiles.Files()) { fileProxy.Url = this.BaseSharePointURL + "_vti_bin/files.asmx"; fileProxy.Credentials = this.NetworkCredential; string[] result = fileProxy.DeleteFile(destinationSPFolder, fileName); if (result != null && result.Length > 0 && result.FirstOrDefault(entity => entity.Contains("DeleteFile:Successful")) == null) { throw new ApplicationException("File delete failed:" + result.ToString()); } } }