# Delete Doc Lib

Deletes a document library from SharePoint by processing rows from an Excel file. When targeting by matter code, also removes the corresponding matter list entries.

Filename pattern: filename must contain deletedoclib (case-insensitive).
Example: 20240115 deletedoclib cleanup.xlsx

# Columns

Name Required Description
Url / DoclibUrl Conditional Server-relative URL of the document library. Required when MatterCode is not provided.
MatterCode Conditional Matter code used to resolve the document library from the matter list. Required when Url is not provided.
ClientCode No Client code used together with MatterCode to identify the matter.
Permanent No Boolean. true permanently deletes the library. false (default) sends it to the recycle bin.

Either Url or MatterCode must be provided.

# Behavior

Deletes the resolved document library. When Permanent is false (default), the library is sent to the recycle bin; when true, it is permanently deleted. When targeting by MatterCode, the handler deletes the first document library URL registered for that matter and also removes the matter record from the My Matters list and the Matter list.

Last Updated: 4/20/2026, 12:54:05 PM