Skip to main content

Create Directory

Creates a directory on the remote FTP server.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Session Id - Id of the FTP session. The ID is the output of the Connect node.
  • FTP Directory Path - Path of the directory to be created on the remote FTP server

Output

  • Path - Path of the created directory on remote FTP server

Directory is created using FTP session provided as an input. Path of the created directory is returned on the output.

How It Works

The Create Directory node creates a new directory on the remote FTP server:

  1. Session Validation: Verifies the session ID is valid and active
  2. Path Validation: Ensures the directory path is not empty
  3. Directory Creation: Creates the directory at the specified path on the FTP server
  4. Path Output: Returns the created directory path for confirmation

Requirements

  • Active FTP session from the Connect node
  • Valid directory path on the FTP server
  • Write permissions on the parent directory
  • Parent directory must exist (some FTP servers don't support recursive creation)

Error Handling

Error CodeDescriptionCause
Core.FTP.CreateDir.ErrOnCreateConfig parse errorNode configuration is malformed
Core.FTP.CreateDir.OnMessageMessage parse errorInput message cannot be parsed
Core.FTP.Create.ErrSessionSession id can not be emptySession ID input is empty
Core.FTP.Create.ErrSessionInvalid sessionSession ID does not exist or has expired
Core.FTP.Create.ErrPathPath can not be emptyDirectory path input is empty
Core.FTP.Create.ErrCreateDirectory creation errorFailed to create directory (details in error message)

Usage Examples

Example 1: Create a Simple Directory

// Input:
// Session ID: "ftp-session-123" (from Connect node)
// FTP Directory Path: "/uploads/reports"
//
// Output:
// Path: "/uploads/reports"

Example 2: Create Directory with Date-Based Naming

// Using a variable for dynamic directory names
// Session ID: "ftp-session-123"
// FTP Directory Path: "/backups/2024-01-15"
//
// This allows you to create organized directory structures
// based on dates, customer names, or other dynamic values

Example 3: Create Subdirectory in Workflow

// Create a directory structure for processing files
// 1. List existing directories
// 2. Create new directory: "/processing/batch-001"
// 3. Upload files to the new directory
// 4. Move to "/completed/batch-001" when done

Usage Notes

  • The node creates a single directory, not a recursive path (parent directories must exist)
  • If the directory already exists, the operation will fail with an error
  • Use forward slashes (/) in paths, even on Windows FTP servers
  • Relative paths are based on the current working directory of the FTP session
  • Some FTP servers may have restrictions on directory names (special characters, length)
  • The created path is returned as output, which can be used in subsequent nodes

Tips

  • Check if a directory exists using List Directory before attempting to create it
  • Use the Continue On Error property if directory existence should not halt the workflow
  • Combine with Date/Time nodes to create timestamped directory structures
  • Use variables to construct dynamic directory paths based on workflow data
  • For nested directory structures, create each level separately in sequence
  • Store the output path for later cleanup operations
  • Consider server permissions when choosing directory locations