# rename-file command

The rename-file BASIC program changes the name of a file, both in the
 master dictionary and in the dictionary of the designated file reference.

**Synonyms:** rnf

The process prompts for the new name. Items within the file and its associated dictionary are
 not affected.

## Syntax

```
rename-file file.reference
new name: new.file.reference
```

## Example(s)

```
rename-file test1
new name: test2
```

## See also

- [copy command](https://d3codex.com/tcl/copy-command/)
- [delete-file command](https://d3codex.com/tcl/delete-file-command/)
- [move-file command](https://d3codex.com/tcl/move-file-command/)
- [rename command](https://d3codex.com/tcl/rename-command/)
- [steal-file command](https://d3codex.com/tcl/steal-file-command/)

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