Read Binary File Time Span
Verb: binaryReadTimeSpan
Available from: <Standard>
Gets the time span from a binary file.
The command considers every file (.txt, .html, .pdf etc.) as binary.
Syntax
binaryReadTimeSpan --file(BinaryFileReader) (TimeSpan)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--file | Binary reader | Required | Binary File Reader | Binary file that holds the data. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Time span | Time Span | Time span obtained from the file. |
Example
Gets a time span from a binary file.
defVar --name binaryReader --type BinaryFileReader
defVar --name timeSpan --type TimeSpan
//Open the file informed for reading.
//Download the following file to execute the command.
openBinaryReader --share "Read" --path "binaryTimeSpan.txt" --encoding "Default" binaryReader=value
//Get the time span contained in the file.
binaryReadTimeSpan --file ${binaryReader} timeSpan=value
logMessage --message "${timeSpan}" --type "Info"
//Execution returns the time span in the variable "timeSpan".
For the correct operation of the script above, it is necessary to download the file and enter its path in the "Path" parameter of the "Open Binary File to Read" command.