Create Directory
Create Directory
Section titled “Create Directory”Type: create-directory · Package: Filesystem Activities v1.0.6 · Output: string
Creates a folder, automatically including every parent folder missing from the path. If the folder already exists, it does nothing (it does not fail). Use it to prepare the output structure before writing or moving files.
How it works
Section titled “How it works”Creates the folder at path. If the path includes intermediate folders that do not exist (C:/output/2026/june), it creates all of them. If it already existed, it carries on without error and without touching its content: it is idempotent and safe to repeat.
The file-writing activities of this package (Write File, Append to File, Copy File, Move File) already create their destination folder; Create Directory is useful for folders other activities need to exist, or to set up an empty structure.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | — | Path of the folder to create. |
Optional parameters
Section titled “Optional parameters”None.
Output
Section titled “Output”Returns a string with the folder path (as you gave it in path), whether it existed before or not.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
Access to the path '…' is denied. | No permission to create the folder there. |
The file '…' already exists. (or another I/O error) | A file with the same name as the folder already exists. Use another name. |
Could not find a part of the path '…'. | The drive or network share does not exist or is not connected. |
'path' is required. | The path expression evaluated to null. |
Example
Section titled “Example”Make sure the month’s folder exists before saving a report:
Create Directory path = pathJoin("C:/reports", today().ToString("yyyy-MM")) → output: folderWrite Excel Sheet path = pathJoin(folder, "sales.xlsx") data = salesRelated activities
Section titled “Related activities”- Write File / Move File — write or move files into the new folder.
- List Files — list its contents.