---
title: "isFileBinary"
canonical: "https://help.vicon.com/space/Shogun114/196384145/isFileBinary"
format: markdown
---
# Description

Use this command to determine if a file was opened as a binary file.

## Functional area

Disk I/O

# Command syntax

## Syntax

|  |
| --- |
| `isFileBinary fileID` |

### Arguments

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

### Flags

None

> Macro (scroll-pagebreak)

## Return value

boolean

## Examples

```plaintext
int $fileID;
// Obtain file ID earlier do some operation to the file
// ...
// See if the file was opened in binary mode 
if( `isFileBinary $fileID` == true ) 
    print "File is a binary file";
  else 
   print "File is a text file";

```

# Additional information

## Related commands

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