Create File
AutomatR.DefaultActivities.FileAndFolder.CreateFile
The "Create File" activity in AutomatR allows you to generate a new file at a specified location. This activity simplifies the process of creating files within automation workflows, enhancing file management capabilities.
Properties
Name | Description |
---|---|
Input | |
File Name | Enter the name for the file to be created. This should be provided as a string. Example: "newfile.txt" . String variables containing the desired file name. |
File Path | Select the browse option or enter the path on your local drive where the new file is to be created. Example: "D:\CreateFile\newfile.txt" . String variables containing the file path. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Create File" activity. This can be useful for handling synchronization issues. Integer variables or arguments containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
How to use:
- Drag and drop the "Create File" activity onto the workflow.
- Configure the properties by specifying the file path and name for the new file.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to create the specified file.
Example: Consider an example where the "Create File" activity is used to generate a new file named "newfile.txt" in the "D:\CreateFile\" directory:
Create File:
Display Name: "Create New File"
File Path: "D:\CreateFile\"
File Name: "newfile.txt"
In this example, the activity creates a new file named "newfile.txt" in the specified directory. If the file already exists, an exception is raised. Adjust the file path and name as needed for your workflow.