SFTP Create Directory
SFTP Create Directory
Section titled “SFTP Create Directory”Type: sftp-mkdir · Package: SFTP Activities v1.1.0
Creates a folder on the SFTP server. Useful to prepare the destination structure before uploading files.
How it works
Section titled “How it works”Creates the remotePath folder on the server. It creates a single level: the parent folder must exist (for /inbound/2026/10, create /inbound/2026 first). If the folder already exists, the server rejects the operation and the activity fails: check it first with SFTP Exists.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
remotePath | string | — | Path of the remote folder to create. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanSftpSession | — | Session from SFTP Connect. Inherited inside a body. |
Output
Section titled “Output”This activity does not return a value.
Common errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'remotePath' is required. | The parameter is missing or the expression returned null. |
'session' must be a ZoanSftpSession. | The activity is outside the SFTP Connect body and received no session. |
| Server error when creating the folder | The folder already exists, the parent folder does not exist, or the user has no write permission. |
Example
Section titled “Example”Make sure the month folder exists before uploading:
SFTP Exists remotePath = "/inbound/" + today().ToString("yyyy-MM") → output: hasFolderIf condition = !hasFolder └─ then: SFTP Create Directory remotePath = "/inbound/" + today().ToString("yyyy-MM")SFTP Upload localPath = file remotePath = "/inbound/" + today().ToString("yyyy-MM") + "/data.csv"Related activities
Section titled “Related activities”- SFTP Upload — upload files to the created folder.
- SFTP Exists — check whether it already exists.