Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
External commands | YES | NO | NO | Windows,Linux |
Write entire file (path, binary-variable) Returns err-code
Note: The flag is set according to whether Omnis was able to make a call to this external command.
This command writes an entire file from a binary field, previously populated by using Read entire file. It returns an error code (See Error Codes), or zero if no error occurs. The Binary value is in the following format:
12 byte header containing the Type (4 bytes), Creator (4 bytes), and File length (4 bytes).
File data.
# read and then write the binary contents of mypicture.jpg
# sys(115) returns the full path to the Omnis executable
Calculate lPathname as con(sys(115),'mypicture.png')
Read entire file (lPathname,lBinfld) Returns lErrCode
Write entire file (lPathname,lBinfld) Returns lErrCode