# listfiles command

The listfiles BASIC program produces
a report showing all file-defining items and synonym-defining items
in an optionally specified file name or account name. The default
file name is md.

**Synonyms:** listfs

## Syntax

```
listfiles {file.reference} {(options}
```

## Parameter(s)

| options | n | Affects output to the terminal only, preventing output from pausing at the end of each (terminal) page of output. |
| --- | --- | --- |
| p | Directs output to the system printer, via the spooler. | |

## Example(s)

Produces a report of all file-defining
items in the master dictionary of the current account and directs
the output to the terminal.

```
listfiles
```
This is similar to the previous example, but the output
is directed to the spooler and the legend-supp (k option) is invoked.

```
listfiles (kp
```
Produces a listing of all files in the dm account using
a file path name.

```
listfiles dm,,
```

## See also

- [check-dx command](https://d3codex.com/tcl/check-dx-command/)
- [legend-supp modifier](https://d3codex.com/access/legend-supp-modifier/)
- [lfd macro](https://d3codex.com/tcl/lfd-macro/)
- [list-files command](https://d3codex.com/tcl/list-files-command/)
- [Options (Access Query Language)](https://d3codex.com/access/options-access-query-language/)
- [Synonym-defining items](https://d3codex.com/definitions/synonym-defining-items/)

---
Source: https://d3codex.com/tcl/listfiles-command/ - part of the D3Codex reference.
