# Export Documents to Filesystem Job
Periodically exports all documents from SharePoint matter libraries to a local or network directory.
Configuration class: ExportDocumentsToFileSystemCfg
Schedule: runs once or more daily at configured times (TimeOfDay)
# Configuration
Configure under Settings > ExportDocumentsToFileSystem in the provisioning service configuration.
| Setting | Type | Default | Description |
|---|---|---|---|
Disabled | bool | false | Disable the scheduled job without removing configuration |
ExportDirectory | string | — | Root directory where exported documents are written. Each matter gets its own subdirectory |
TimeOfDay | TimeSpan[] | — | Times of day when the job runs. Multiple values schedule repeated runs. Example: 09:00:00,17:00:00 |
MatterListFilter | string | — | Optional filter on the matter list. Supports a single rule with syntax field=value. Only one filter is supported |
ExportDirectoryUseMatterCodeAndName | bool | false | When enabled, subdirectories are named {mattercode}__{mattername} instead of just the matter code |
# How it works
- Filters the matter list using
MatterListFilterif configured - For each matter, creates
{ExportDirectory}\{mattercode}(or{mattercode}__{mattername}whenExportDirectoryUseMatterCodeAndNameis enabled) - Downloads all documents from each matter's document libraries, preserving the folder hierarchy
# Behavior notes
- Deleted files are not removed from the export. The job only adds and updates files found in SharePoint — it never scans the local export folder for files that no longer exist in SharePoint, so deleting a document in SharePoint does not delete its exported copy.
- Permissions and metadata are not exported. Only the file content is written to disk; SharePoint permissions and column values are not included in the export.
- Each version is exported as a separate file, suffixed
{filename}__v{version}{extension}(e.g.Contract__v2_0.docxfor version2.0). The current version is also exported under its plain filename. - Incremental runs are optimized per document library. Each target directory's own filesystem last-write timestamp is used as a "last exported" marker: if the document library's most recent item modification or deletion is not newer than that timestamp, the library is skipped entirely on that run. After a successful export, the directory's timestamp is updated to the library's latest modification/deletion time. Within a library, an already-exported version is only re-downloaded if its local file's last-write time doesn't match SharePoint's modified date for that version.
# MatterListFilter
Filters the matter list before exporting. Only matters matching the filter are exported. Syntax: field=value, where field is the internal name or display name of any column in the SharePoint Matters list.
The filter performs an exact equality match (case-insensitive). Only one filter rule is supported.
Special value __EMPTY__ matches matters where the field is empty or null.
| Example | Effect |
|---|---|
Status=Active | Export only matters where the Status column equals Active |
Status=__EMPTY__ | Export only matters where Status is empty |
MatterType=Litigation | Export only matters of a specific type |
Field must exist in the Matters list
If the field name is not found in the SharePoint Matters list, the job fails with an error. Use the internal name or display name exactly as configured in the list.
# Troubleshooting
# Job does not run
- Cause:
Disabledistrue,TimeOfDayis empty, orExportDirectoryis not set - Resolution: Ensure all three are configured
# Related
- FileSystem export — manual export of specific matters from Epona.Migrate
- Jobs overview — other background jobs
- Scheduling Jobs — schedule configuration details