Append Line
AutomatR.DefaultActivities.FileAndFolder.AppendLine
The "Append Line" activity in AutomatR allows you to add a specified string to the end of a file. This activity is particularly useful for updating log files or recording additional information in an existing file.
Properties
Name | Description |
---|---|
Input | |
File Path | Browse or provide the full path of the file to which you want to append the content. |
Text | Specifies the text that should be added (appended) to the file. |
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 variable or argument containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Append Line" activity. This can be useful for handling synchronization issues. Integer variable or argument 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 "Append Line" activity onto the workflow.
- Configure the properties by specifying the file path and the text to be appended.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to add the specified text to the end of the selected file.
Example: Consider an example where the "Append Line" activity is used to add a log entry to a log file:
Append Line:
Display Name: "Append Log Entry"
File Path: "C:\Logs\logfile.txt"
Text: "Workflow execution completed successfully."
In this example, the activity appends the specified text, "Workflow execution completed successfully," to the end of the "logfile.txt" file located at "C:\Logs\". The operation is performed without direct output, and the updated file can be reviewed for the appended content.