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

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
FilePath 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
DataData to be written.Robin.Object
Yes
EncodingEncoding 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
AddBoolean 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.BooleantrueNo
With new lineBoolean 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.BooleantrueNo

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

  1. Move the "Write to text file" action to the workspace.


  2. Set the parameters of the "Write to text file" action. 


  3. Click on the "Start" button in the top panel. 

Result

The program robot completed successfully.

The text has been added to the file. 

  • Нет меток