SEEKEND Function

Sets the file pointer to a position in the file counted from the end of the file.

Category: External File
Returned data type: Integer
Note: The returned value is a Boolean value where 1= success and 0 = error.

Syntax

fileobject.seekend(<position>)

Required Argument

position

an integer specifying the number of bytes that need to be back from the end of the file. Specifying a 0 means the end of the file. This parameter can be specified as a number, field name, or expression

Details

The seekend method moves the file pointer backwards the number of bytes that were specified, where 0 indicates the end of the file. It returns true on success otherwise false is returned.

Example

file f

f.open("C:\filename.txt", "rw")

 

// write information to the end of the file

f.seekend(0)

f.writeline("This is the end ")

f.close()