Copy as Markdown[View as Markdown](/docs/sdk/functions/removeExampleFromCommand.md)

***

# Function: removeExampleFromCommand()

> **removeExampleFromCommand**(`directory`): (`id`, `fileName`, `version`?) => `Promise`<`void`>

Defined in: commands.ts:368

Remove an example file from a command.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter  | Type     |
| ---------- | -------- |
| `id`       | `string` |
| `fileName` | `string` |
| `version`? | `string` |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`void`>

## Example[​](#example "Direct link to Example")

```
import utils from '@eventcatalog/utils';

const { removeExampleFromCommand } = utils('/path/to/eventcatalog');

await removeExampleFromCommand('UpdateInventory', 'basic.json');
await removeExampleFromCommand('UpdateInventory', 'basic.json', '0.0.1');
```
