This property returns True when the end of a file opened for random or sequential input is reached.
file.EOF
Use the EOF property to avoid the error generated by attempting to read past the end of a file.
The EOF property returns False until the end of the file has been reached. For files opened with a fsModeRandom or fsModeBinary file mode, EOF returns False until the last executed Get statement is unable to read an entire record.
For files opened with a fsModeBinary file mode, an attempt to read through the file using the Input function until EOF returns True generates an error. Use the LOF and LOC properties instead of EOF when reading binary files with Input, or use Get when using the EOF property. For files opened with a fsModeOutput file mode, EOF always returns True.