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


## Description

> Macro (excerpt)
> 
> Deletes a dir. It also returns "true" if the directory was deleted successfully and "false" otherwise.

Deletes a dir. It also returns "true" if the directory was deleted successfully and "false" otherwise. Directory must be empty.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | deleteDirectory(path_to_dir) | **Package** | file |
| **Alias** |  | **Pkg Usage** | deleteDir(path_to_dir) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| path_to_dir | string | Yes | Specifies the directory to delete. |

## Return Type

**boolean (true/false)**

## Example

```javascript
deleteDirectory("C:/tmp/MYDIR");
```

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

## See also

> Macro (contentbylabel)