Export an Alfresco folder tree to a local Windows path with preserved structure, retry logic, and optional ZIP packaging.
ExportAlfrescoTree is a focused PowerShell utility for downloading a complete
folder tree from Alfresco through the public REST API, recreating the same
structure locally, and optionally generating a ZIP archive for handoff or backup.
- Website:
https://os3rvno.github.io/ExportAlfrescoTree/ - Repository:
https://github.com/OS3RVNO/ExportAlfrescoTree - Changelog:
CHANGELOG.md - Releases:
https://github.com/OS3RVNO/ExportAlfrescoTree/releases
Use this project when you need to:
- export a full Alfresco folder hierarchy without manually downloading files one by one
- preserve the original folder layout on disk
- retry transient HTTP failures automatically
- avoid hardcoded credentials in the script
- generate a clean ZIP package after the export finishes
- parameterized script with no embedded credentials
- recursive traversal of Alfresco folders
- support for paginated API responses
- optional ZIP creation after download
- invalid Windows file name sanitization
- empty folder creation during traversal
- skip-existing mode for repeatable runs
- colorized console UI with progress reporting and final summary
Export-AlfrescoFolderTree.ps1
- Windows PowerShell 5.1 or PowerShell 7+
- network access to an Alfresco instance
- valid credentials for the Alfresco public REST API
$credential = Get-Credential
.\Export-AlfrescoFolderTree.ps1 `
-AlfrescoUrl "https://alfresco-site.example" `
-RootNodeId "workspace://SpacesStore/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" `
-DestinationPath "C:\Temp\AlfrescoExport" `
-Credential $credential `
-ZipFilePath "C:\Temp\AlfrescoExport.zip" `
-Verbose==========================================================================================
ALFRESCO FOLDER EXPORT
Recursive download with local tree and optional ZIP archive
==========================================================================================
[CONFIGURATION]
------------------------------------------------------------------------------------------
URL: https://alfresco-site.example
Root Node: workspace://SpacesStore/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Destination: C:\Temp\AlfrescoExport
ZIP Output: C:\Temp\AlfrescoExport.zip
Page Size: 100
Retries: 3
Skip Existing: False
[TRANSFER]
------------------------------------------------------------------------------------------
[INFO] Starting recursive export from Alfresco root node.
[DIR ] Contracts
[FILE] contract-001.pdf
[OK ] Saved to: C:\Temp\AlfrescoExport\Contracts\contract-001.pdf
[FILE] contract-002.pdf
[SKIP] Existing file skipped: contract-002.pdf
==========================================================================================
RUN SUMMARY
------------------------------------------------------------------------------------------
Folders: 3
Files Found: 12
Downloaded: 10
Skipped: 2
Errors: 0
==========================================================================================
| Parameter | Description |
|---|---|
-AlfrescoUrl |
Base URL of the Alfresco instance |
-RootNodeId |
Node ID of the folder to export |
-DestinationPath |
Local destination folder |
-Credential |
PSCredential object used for Basic authentication |
-ZipFilePath |
Optional path for the final ZIP archive |
-PageSize |
Number of items requested per API page |
-MaxRetryCount |
Retry count for transient failures |
-SkipExisting |
Skip files that already exist in the destination path |
- The script uses Basic authentication against the Alfresco public REST API.
- File names containing invalid Windows characters are sanitized automatically.
- If
-ZipFilePathis specified, any existing ZIP at that location is overwritten. - The ZIP file must not be created inside
-DestinationPath.
- OAuth or token-based authentication support
- structured file logging
- filtering by file extension or date
- automated tests and PowerShell linting
This repository now includes:
- a keyword-focused README
- repository topics and description
- a dedicated GitHub Pages landing page
- crawl-friendly metadata,
robots.txt, andsitemap.xml
These changes improve discoverability, but search indexing is never guaranteed.
This repository is released under the Unlicense. See LICENSE for details.
