Write in Text File

Verb: textWrite

Writes the content specified in the Text parameter to a text file previously opened.

Syntax

textWrite --text(String) --file(TextFileWriter)

Inputs

Script Designer Required AcceptedTypes Description
--text Text Required Text Text that should be written to the file.
--file Text writer Required Text File Writer Variable that holds the opened text file used for writing.

Example

Writes the contents of the Text parameter to the text file that was opened using the Open Text File for Writing command.

defVar --name pathFile --type String
defVar --name writerText --type TextFileWriter
getSpecialFolder --folder "Desktop" pathFile=value
// Open the file entered for writing.
openTextWriter --mode "OpenOrCreate" --autoflush  --share "None" --path "${pathFile}\\fileText.txt" --encoding "Default" writerText=value
// Write the entered text to the open file.
textWrite --text "Intelligent Automation with IBM Robotic Process Automation!" --file ${writerText}

See Also

  • Binary Read Int
  • Close Binary File
  • Close Text File
  • Get Binary File Boolean
  • Get Binary File Characters
  • Get Binary File Text
  • Get Date and Time in Binary
  • Get Table from a Text File
  • Get Text File Line
  • Go to Text Reader Line
  • Move Index in Binary File
  • Open Binary File for Reading
  • Open Binary File for Writing
  • Open Text File for Reading
  • Open Text File for Writing
  • Read Binary File Decimal
  • Read Binary File Time Span
  • Read Delimited Line of Text File
  • Read Text to the End
  • Save Changes to Binary File
  • Save Changes to Text File
  • Write Boolean in Binary File
  • Write Date Time in Binary File
  • Write Decimal to Binary File
  • Write Delimited Text Line to Text File
  • Write Delimited Texts in Text File
  • Write Integer to Binary File
  • Write Text in Binary File
  • Write Text Line to Text File
  • Write Time Span in Binary File