Description:
The Create Directory workflow step creates a new directory in the file system using the configured parent directory and sub-directory name.
The step supports:
- Specifying a parent directory.
- Specifying the name of the new sub-directory.
- Using workflow-generated values for the directory path and directory name.
- Creating directories as part of automated file-processing workflows.
- Returning a True or False result for subsequent workflow processing.
Inputs
- parentDirectory – The Parent directory property specifies the directory under which the new sub-directory should be created.
- newDirectoryName – The Name of the sub-directory property specifies the name of the new directory to create under the configured parent directory.
Returns
- True – The True return path can be connected to the next workflow activity when the directory creation operation succeeds.
- False – The False return path can be used for an alternative workflow path or error-handling logic when the directory creation operation does not succeed.
Usage:
The Create Directory step is typically placed before workflow activities that need to create, save, move, or otherwise process files in a directory that may not yet exist.
A typical workflow pattern is:
Determine Directory → Create Directory → Process Files
The directory path and sub-directory name can be supplied as workflow-generated values.
The step can be useful when a workflow needs to:
- Create a directory for a workflow instance.
- Create customer-specific or request-specific folders.
- Prepare a directory before generating files.
- Organize files by date or business category.
- Create directories dynamically from workflow information.
- Prepare a file-system location for downstream activities.
- Branch the workflow depending on whether directory creation succeeds.

Typical Workflow Suggestions:
Create a Directory Before Generating Files
Use the step before file-generation activities when generated files need to be placed in a dedicated directory.
Example:
Prepare File Path → Create Directory → Generate File
For example:
Parent directory:C:\FlowWright\Output
Name of the sub-directory:Reports
The workflow can then continue to the file-generation activity after creating the directory.
Create a Customer-Specific Directory
Use workflow information to create a directory associated with a particular customer.
Example:
Get Customer Data → Create Directory → Generate Customer Files
For example:
Parent directory:C:\FlowWright\Customers
Name of the sub-directory:{{CustomerID}}
This allows a workflow to organize files into customer-specific directories.
Create a Request-Specific Directory
Use this step to create a directory for an individual request or transaction.
Example:
Receive Request → Create Directory → Store Request Files
For example:
Parent directory:C:\FlowWright\Requests
Name of the sub-directory:{{RequestID}}
Downstream file-processing activities can then use the resulting directory.
Create a Directory for Workflow Instance Files
Use workflow information to organize files by process instance.
Example:
Start Process → Create Directory → Generate Documents
For example:
Parent directory:C:\FlowWright\Instances
Name of the sub-directory:{{InstanceID}}
This pattern can help separate files generated by different workflow instances.
Create Date-Based Directories
Use a workflow-generated date value as part of the directory name when files need to be organized by processing date.
Example:
Get Processing Date → Create Directory → Save Files
For example:
Parent directory:C:\FlowWright\Archive
Name of the sub-directory:2026-09-28
The exact date-formatting approach should be handled by the workflow before the Create Directory step.
Prepare a Directory for Document Processing
Use the step before document-processing activities.
Example:
Receive Documents → Create Directory → Download/Copy Documents → Process Documents
The workflow ensures the required directory is available before subsequent file activities run.
Create Directories for Generated Reports
Use the step to establish a location for generated reports.
Example:
Collect Report Data → Create Directory → Generate Report → Save Report
Possible configuration:
Parent directory:C:\FlowWright\Reports
Name of the sub-directory:{{ReportPeriod}}
This can help organize generated reports by reporting period.
Create a Directory for Temporary Processing
Use the step when a workflow needs a dedicated location for intermediate files.
Example:
Start Processing → Create Directory → Create Temporary Files → Process Files
A workflow can create a dedicated sub-directory under a configured temporary location.
Create Directories for Different Business Categories
Use workflow conditions to determine the directory name.
Example:
Determine Category → Create Directory → Store Files
Possible directory names might be:
FinanceHROperationsSales
The workflow can determine the appropriate value before the Create Directory step executes.
Create a Directory Before an Integration
Use the step when an integration requires a local file-system location for input or output files.
Example:
Prepare Integration → Create Directory → Export Files → External Integration
You can prepare the directory before files are generated or transferred.
Handle Directory Creation Failure
Use the True and False return paths to handle the result of the directory creation operation.
Example:
Create Directory
→ True → Continue File Processing
→ False → Log Error / Notify Administrator
The False path can be connected to an appropriate error-handling activity.
Example:
Let’s build and execute the “createDirectoryDef” example.
- Create a new process definition called “createDirectoryDef” and open it in Designer mode.
- Drag a “createDirectory” step to the canvas.
- Connect the dots between the “Start” and the “createDirectory” steps as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
- Define a variable or a global to store the new file path.
- Click the “createDirectory” step to configure its “Required” properties. Provide a name for the step, then click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the “createDirectory” step to configure its “Optional” properties. Provide the source directory path. Provide the new directory path. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition. Create a new process instance and execute it. Render the process instance and select the Create Directory step to view its properties and execution information. When the workflow reaches the step, FlowWright attempts to create the configured sub-directory under the specified parent directory. If the operation succeeds, the workflow can continue through the True path. If it does not succeed, the workflow can follow the False path for alternate processing or error handling.

- Click the process step to view its properties. The step should create a new directory on the server, and its status should be complete.

Tips:
- Provide a valid Parent directory value.
- Provide a meaningful name for the sub-directory.
- Use workflow Variables to dynamically construct directory paths when appropriate.
- Verify that the directory path is valid for the environment where the workflow executes.
- Test the workflow using representative directory paths.
- Verify that the workflow execution environment has the required file-system access.
- Consider the permissions of the Windows/service account under which FlowWright performs the operation.
- Avoid using unnecessary hard-coded environment-specific paths.
- Use environment-specific Variables or configuration where the directory location differs between environments.
- Use meaningful directory names that make generated files easy to identify.
- Use consistent directory naming conventions across related workflows.
- Test directory creation when the parent directory already exists.
- Test the workflow when the parent directory does not exist.
- Test invalid or inaccessible directory paths.
- Test directory names containing spaces or other characters permitted by the target file system.
- Consider the security implications of allowing workflow data to directly determine directory paths or names.
- Validate dynamically generated directory names before passing them to the step.
- Avoid allowing untrusted user input to construct arbitrary file-system paths without appropriate validation.
- Connect the False return path to appropriate error-handling or notification logic.
- Verify the directory before using it in downstream file operations.
- Do not assume that the step returns the newly created directory path; the supplied XML exposes only True and False return values.
- Do not assume that missing parent directories are automatically created unless this behavior has been confirmed in the FlowWright implementation.
- Test the workflow after changing the target directory structure or execution environment.
Definition Sample:
You may provide a sample CreateDirectoryDef process definition for users to download and later import into their FlowWright Process Definition.
After importing the sample, verify and complete any missing configuration, including:
- Parent directory.
- Name of the sub-directory.
- Workflow Variable references used for dynamic directory values.
- Environment-specific file-system paths.
- Required file-system permissions.
- Downstream True and False workflow paths.
After verifying the configuration, save the Process Definition before execution.