# fs command

The fs command saves a copy of the current
item and remains in the Editor within the current item. It is essentially
the same as the fi command, but does not exit the
item. When editing large items, periodically issue an fs command to ensure an update to the file. A different file reference
and/or item-ID may be specified prior to saving the item.

See [fso command](https://d3codex.com/editor/fso-command/) for writing over pre-existing
items.

## Syntax

```
 fs{(file.reference}{item-ID}
```

## Parameter(s)

| item-ID | Name of the item saved. |
| --- | --- |
| file.reference | Name of the file to write to. |

## Example(s)

Writes a copy of the item back
to the file from which it was originally retrieved.

```

ed bp main.program
top
.fs
```
Makes a backup copy of `main.program`,
calling the new copy `main.program.original`. This
is useful in making historical copies or saving originals under different
names prior to making changes without leaving the Editor.

```

ed bp main.program
top
.fs main.program.original
```

## See also

- [Error messages](https://d3codex.com/editor/error-messages/)
- [ex command](https://d3codex.com/editor/ex-command/)
- [fd command](https://d3codex.com/editor/fd-command/)
- [fi command](https://d3codex.com/editor/fi-command/)
- [fso command](https://d3codex.com/editor/fso-command/)
- [Editor overview](https://d3codex.com/editor/editor-overview/)

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