# Move Folder
Moves folders within or between document libraries by processing rows from an Excel file.
Filename pattern: filename must contain movefolder but NOT removefolder (case-insensitive).
Example: 20240115 movefolder restructure.xlsx
# Columns
| Name | Required | Description |
|---|---|---|
| Url | Conditional | Server-relative URL of the document library. Required when MatterCode is not provided (SharePoint 2016 builds). On SharePoint Online, SourceFolder and TargetFolder can be absolute URLs instead. |
| MatterCode | Conditional | Matter code used to resolve the document library from the matter list. Required when Url is not provided on SharePoint 2016. |
| ClientCode | No | Client code used together with MatterCode to identify the matter. |
| SourceFolder / Folder | Yes | Source folder path. On SharePoint 2016, this is a relative path within the library. On SharePoint Online, this can be an absolute URL or a path that is prefixed with the Url or matter doclib URL. |
| TargetFolder / NewFolder | No | Target folder path. On SharePoint 2016, this is relative within the same library. On SharePoint Online, this can be an absolute URL or prefixed path. |
SourceFolder is always required.
# Behavior
SharePoint 2016: Both SourceFolder and TargetFolder are relative paths within the same document library (resolved via Url or MatterCode). If the matter has more than one document library, the row fails — use Url directly.
SharePoint Online: Each row's source and target are resolved by prefixing the Url or matter doclib URL. Absolute URLs are used directly.
# Related links
- Delete Folder handler — delete folders
- Folder Set handler — create folder structures
- Rename Folder handler — rename a folder