---
title: "isEndOfFile"
canonical: "https://help.vicon.com/space/Shogun113/84225080/isEndOfFile"
format: markdown
---
# Description

Use this command to determine whether you are at the end of a file. This is useful when you are reading in a file and want to know if you have finished reading all the contents or gotten to the end.

readXXXX commands performed when at the end of a file will fail, causing your script to fail, so it is good practice to call this command often when reading a file.

## Functional area

Disk I/O

# Command syntax

## Syntax

|  |
| --- |
| `isEndOfFile fileID` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `fileID` | int |  | ID of file previously opened with [fileOpen](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84214197) |

### Flags

None

> Macro (scroll-pagebreak)

## Return value

boolean

## Examples

```plaintext
int $fileID;
// Obtain file ID earlier do some operation to the file
// ...
while( `isEndOfFile` == false )
   { 
   // Read in something
}
```

# Additional information

## Related commands

- [fileOpen](https://vicon-help.atlassian.net/wiki/spaces/Shogun113/pages/84214197)