Create File
Technical Reference
|
INPUT |
Extn: "Specify the desired file type by selecting the appropriate extension for creation. From the dropdown, choose one of the following: |
FileName: Specify the name of the file to be created. It accepts the “String” datatype. |
||
FilePath: Indicate the path where the folder needs to be created or manually select it by clicking the area adjacent to the file path when the activity is double-clicked. It accepts the “String” datatype. |
||
Overwrite: When this parameter is checked, it allows you to overwrite the file. If the parameter is unchecked, the file will not be overwritten. By default, this parameter is unchecked. |
||
MISC |
Display Name: Displays the name of the activity. The activity name can also be customized to help in troubleshooting." |
|
SkipOnError: Specify the Boolean value as “True or False.” |
||
Version: It specifies the version of the FS automation feature in use |
||
OUTPUT |
Result: It helps to view the execution state of the activity. It returns the values in Boolean format. |
* Represents mandatory fields to execute the workflow.
The following activity illustrates how we can create a new file in a specified folder.
1. Create a new solution or open an existing solution.
2. Drag and drop the Create File activity from FS Automation.
3. Double click on the activity.
a.
Provide the "FileName." In this case, we are using the file name as "Sample”.
b. Provide the file path where the file needs to be created, or by clicking on the adjacent
area, you can choose the path. In this example, we have chosen the folder name as 'Test'."
5. Declare and assign a new variable in Result tab. This is done to see the success state of the
activity. Here it is “CF”. This is in “Boolean” datatype.
6. Drag and drop the "WriteLog" activity next to the "CreateFile" activity to observe the success
state of the activity.
a. Enter the input string. Here, I'm using "CF," which was declared in the "Result" parameter
of the "CreateFile" activity. The reason for providing ".Tostring" is to convert the
“Boolean” datatype to “String” datatype.
b. Here it “CF.ToString”
7. Now, execute the workflow.
The bot creates a new Microsoft word document in the specified location.