Write to text file Version 16 (Java)
Action group: File system
Description
This action is intended to write data to the specified file.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
File | Path to the file to which the action will be applied. Does not work with formats opening text in additional software (.doc, .docx, etc. ). | Robin.FilePath | Yes | |
Data | Data to be written. | Robin.Object | Yes | |
Encoding | Encoding used to write the text. Supported encodings are marked on the page https://docs.microsoft.com/en- us/dotnet/api/system.text.encoding?view=netcore-3.1 in the column titled «.NET Framework support». | Robin.String | No | |
Add | Boolean variable, optional. If the value of the variable is True, then the text will be appended to the end of the file. Otherwise, the text will be replaced. By default, the parameter is set to false.. | Robin.Boolean | true | No |
With new line | Boolean variable, optional. If the value of the variable is True, then the text will be added on a new line. By default, the parameter is set to false. | Robin.Boolean | true | No |
Special conditions of use
Only a text file can be written to.
Supported encodings are marked with check marks on the page https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding?view=netcore-3.1 in the column labeled ".NET Framework support".
Example of use
Task
There is an empty text file. It is necessary to add text to it.
Solution
Use the "Write to text file" action.
Implementation
- Move the "Write to text file" action to the workspace.
- Set the parameters of the "Write to text file" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully.
The text has been added to the file.
Обзор
Инструменты контента