Skip to content

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.

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.

ParameterTypeDefaultDescription
remotePathstring—Path of the remote folder to create.
ParameterTypeDefaultDescription
sessionZoanSftpSession—Session from SFTP Connect. Inherited inside a body.

This activity does not return a value.

MessageCause 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 folderThe folder already exists, the parent folder does not exist, or the user has no write permission.

Make sure the month folder exists before uploading:

SFTP Exists remotePath = "/inbound/" + today().ToString("yyyy-MM") → output: hasFolder
If condition = !hasFolder
└─ then:
SFTP Create Directory remotePath = "/inbound/" + today().ToString("yyyy-MM")
SFTP Upload localPath = file remotePath = "/inbound/" + today().ToString("yyyy-MM") + "/data.csv"