---
title: "fileExists"
canonical: "https://support.appfire.com/space/PSCONF/15303329/fileExists"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | fileExists(path_to_file) | **Package** | file |
> | **Alias** |  | **Pkg Usage** | exists(path_to_file) |

## Description

> Macro (excerpt)
> 
> Returns 'true' if the file exists and 'false' otherwise.

Returns 'true' if the file exists and 'false' otherwise.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | path_to_file | String | Yes | Specifies the file name you want to search for. |

## Return Type

**Boolean (true/false)**

## Example

```
if(fileExists("C:/someFile.txt")){
    print("The file exists!");
} else {
    print("The file does not exist!");
}
```


> ⚠️ It is recommended that you use forward slashes ( / ) for file paths.

## See also

> Macro (contentbylabel)