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:
- Session Validation: Verifies the session ID is valid and active
- Path Validation: Ensures the directory path is not empty
- Directory Creation: Creates the directory at the specified path on the FTP server
- 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 Code | Description | Cause |
|---|---|---|
| Core.FTP.CreateDir.ErrOnCreate | Config parse error | Node configuration is malformed |
| Core.FTP.CreateDir.OnMessage | Message parse error | Input message cannot be parsed |
| Core.FTP.Create.ErrSession | Session id can not be empty | Session ID input is empty |
| Core.FTP.Create.ErrSession | Invalid session | Session ID does not exist or has expired |
| Core.FTP.Create.ErrPath | Path can not be empty | Directory path input is empty |
| Core.FTP.Create.ErrCreate | Directory creation error | Failed 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
Related Nodes
- Connect - Establish FTP connection
- List Directory - List directory contents
- Delete Directory - Remove a directory
- Upload - Upload files to the directory
- Move File - Move files into the directory
- Disconnect - Close the FTP session