---
title: "createFile"
canonical: "https://support.appfire.com/space/PSJC/434799160/createFile"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Creates an empty file.

Creates an empty file. It also returns "true" if the file was created successfully and "false" otherwise. If returned "false" check the log for a detailed reason on why it failed.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | createFile(path_to_file) | **Package** | file |
| **Alias** |  | **Pkg Usage** | create(path_to_file) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| path_to_file | String | Yes | Specifies the file name to create. |

## Return Type

**Boolean (true/false)**

## Example

```javascript
createFile("C:/fileToCreate.txt");
```

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

## See also

> Macro (contentbylabel)