Write Text in Binary File
Verb: binaryWriteString
Available from: <Standard>
Writes binary text into a binary file.
The command interprets all file types (.txt, .html, .pdf, ...) as binary.
Syntax
binaryWriteString --value(String) --file(BinaryFileWriter)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--value | Text | Required | Text | Text that should be written in binary in the file. |
--file | Binary Writer | Required | Binary File Writer | Binary file for writing. |
Example
The command writes text to a binary file after using the Open Binary File for Writing command to create this file.
defVar --name binaryWriter --type BinaryFileWriter
defVar --name filePath --type String
defVar --name text --type String --value "IBM Robotic Process Automation"
getSpecialFolder --folder "Desktop" filePath=value
openBinaryWriter --mode "Create" --autoflush --share "Write" --path "${filePath}\\binary.txt" --encoding "Default" binaryWriter=value
binaryWriteString --value "${text}" --file ${binaryWriter}
binaryFileClose --file ${binaryWriter}