Save Changes to Binary File
Verb: binaryFlush
Available from: <Standard>
Saves changes made to the binary file.
The command interprets all file types (.txt, .html, .pdf, ...) as binary.
Syntax
binaryFlush --file(BinaryFileWriter)
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--file | Binary File | Required | Binary File Writer | Binary file that should be opened. |
Example
The command saves changes to a binary file after a decimal number is written to it. At the end, the binary file is closed.
defVar --name fileToWrite --type BinaryFileWriter
defVar --name filePath --type String
getSpecialFolder --folder "Desktop" filePath=value
openBinaryWriter --mode "OpenOrCreate" --share "Write" --path "${filePath}\\flush.txt" --encoding "Default" fileToWrite=value
binaryWriteDecimal --value 1001.95 --file ${fileToWrite}
binaryFlush --file ${fileToWrite}
binaryFileClose --file ${fileToWrite}
Remarks
For commands such as Open Binary File for Reading and Open Binary File for Writing, which contain the previously marked "Auto Flush" parameter, there is no need to use the Save Changes to Binary File command because changes are already saved to the file automatically.