---
title: "fileReadByte"
canonical: "https://support.appfire.com/space/PSJ/15488606/fileReadByte"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | fileReadByte(fid) | **Package** | file |
| **Alias** |  | **Pkg Usage** | readByte(fid) |

## Description

> Macro (excerpt)
> 
> Reads a byte from an open file.

Reads a byte from an open file.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| fid | String | Yes | The id of the open file to read from. |

## Return Type

**Byte**

## Error Handling

Throws **String**


 Error: "read_error": followed by the error message if the read fails
 


## Example

### Example 1

```javascript
use "file";
int fid = fileOpen("C:\myData.dat");
runnerLog(fileReadByte(fid));
close(fid);
```

Returns: 61

## See also

> Macro (contentbylabel)