---
title: "File Enumerater"
description: "EMILY.RPA File Enumerater module: list the files in a specified folder and write them to output.csv."
source: https://docs.emily.tips/en/wap/dir2csv
---

# File Enumerater

List files in a specified folder and write them to an output.csv file. `FOLDER` is the specified folder — click the "**PICK**" button to specify the file path or use the **%FILENAME%** variable.

![](https://docs.emily.tips/img/en/wap-051.png)

## No-Code Editor

Provides No-Code commands such as: "**Reset output.csv**" and "**Filter Files to List**". For example, add files from the desktop whose filename contains `invoice` to output.csv.

![](https://docs.emily.tips/img/en/wap-052.png)

## Low-Code Editor

![](https://docs.emily.tips/img/en/wap-053.png)

### input Array

Each element in the input array represents the path of a file in the specified folder.

```javascript
// Print the path of each file in the specified folder
input.forEach((filepath) => console.log(filepath))
```

### output Array

Each file path in the output array will be used to generate a CSV format file.

```javascript
// Create a CSV table from all TXT files in the specified folder
input.forEach((filepath) => {
  if (filepath.endsWith('txt')) output.push(filepath)
})
```
