# fi command

The fi command files the current item,
saving all changes made. Control returns to TCL or to the next item
in the active list.

## Syntax

```
 fi{options}{(file.reference}{item-ID}
```

## Parameter(s)

| options | k | Cancels any select list and returns to TCL after the item is filed. |
| --- | --- | --- |
| o | Overwrites any existing item with the same name on a specified file. | |
| file.reference | Name of the file to write to. | |
| item-ID | Name of the item saved. | |

## Description

A different file reference and/or
item-ID may be specified prior to filing the item.

## Example(s)

Files the item, with any changes
made, over the original item.

```

ed bp program1
top
.fi
’program1’ filed.
```
Files the item, with any changes made, under a different
item-ID. The original item remains unchanged.

```

ed bp program1
top
.fi new.program1
’new.program1’ filed.
```
Any changes made to `program1` in this
example are saved in `program2` only. No changes are
saved to `program1`.

```

ed bp program1
top
.fi program2
’program2’ filed.
```
This means that the item, `new.program1`, was already on file.

```

ed bp program1
top
.fi new.program1
item is already on file
```
It can be overwritten as:

```

.fio new.program1
’new.program1’ filed.
```

## See also

- [Active list](https://d3codex.com/definitions/active-list/)
- [de command (Editor processor)](https://d3codex.com/editor/de-command-editor-processor/)
- [Error messages](https://d3codex.com/editor/error-messages/)
- [ex command](https://d3codex.com/editor/ex-command/)
- [exk command](https://d3codex.com/editor/exk-command/)
- [fs command](https://d3codex.com/editor/fs-command/)
- [fso command](https://d3codex.com/editor/fso-command/)
- [Editor overview](https://d3codex.com/editor/editor-overview/)

---
Source: https://d3codex.com/editor/fi-command/ - part of the D3Codex reference.
