
Export a Folder Hierarchy to a Portable Zip File
exportFolder.RdExports an entire folder hierarchy — including subfolders, analysis trees (with their workflow steps), standalone files, and links — to a zip file that can be imported into another repository. Cross-tree links and folder-level links are preserved.
Arguments
- folderIdent
Identifier of the folder to export. Can be a path, resource ID, or entity ID.
- exportName
Character. Name for the exported folder package (without extension). Used as the zip filename and internal folder name.
- targetFolder
Character. Directory path where the zip file and mapping templates will be created. Defaults to current directory (".").
Details
The export process:
Recursively traverses the folder hierarchy via
loadChildResources()Classifies each child: Folder, File, Analysis Tree, Link, ExtLink
For trees: extracts steps via
getWorkflow()/getStep()into a unified step data frame (same format as workflow export)Collects internal links across ALL trees (cross-tree links supported)
Downloads step files via
cloneCli(); standalone folder files viagetData()Generates manifest.json, workflow.json-compatible step data, and mapping templates
Packages everything into a single zip file
Export Structure
<exportName>/
manifest.json # Folder structure + tree/link metadata
workflow.json # Unified step data (same format as exportWorkflow)
internalLinks.json # Step-to-step links across all trees
links/ # External dependency files
<stepHandle>/
inputFiles/
outputFiles/
folderFiles/ # Standalone files from folders
<resourceId>_<filename>
Generated Mapping Templates
Same as exportWorkflow: <exportName>LinkMapping.json and
<exportName>ToolMapping.json are created alongside the zip.
See also
importFolder for importing exported folders,
exportWorkflow for exporting single workflows