Writes a certain number of bytes to a file.
| Category: | External File |
| Returned data type: | Integer |
| Note: | The returned value is an integer representing the number of bytes written. |
an integer specifying the number of bytes that is written to the file. This parameter can be specified as a number, field name, or expression.
a string that contains the bytes that need to be written. This parameter can be specified as a fixed string, field name, or expression.
string input
file f
string = "this is longer than it needs to be"
f.open("C:\filename.txt", "rw")
// This will write to the beginning of the file
// Only the first 10 bytes from the string will be written
// If the file was smaller than 10 bytes it will be automatically
// appended
f.writebytes(10, input)
f.close()