# RENAME

> [HTML Version](rename_lit.htm)

_Updated June 2019; see History_

**RENAME <out-wildspec>=<in-wildspec1> \{switches\}**

RENAME renames files without moving them.

**Parameters**

_out-wildspec_

may be a single file, or a wildcard specification.

_in-wildspec_

may be a single file, a wildcard specification, or a comma-delimited list of file or wildcard specifications.

**Switches**

| | |
|------|------|
| **Switch** | **Effect ** |
| /ARC\{:#\}  | Causes any existing destination file to be archived prior to being overwritten. For a given destination extension XXX, the archive(s) will be named X## (01, 02, ...) up to the specified (:#) number of generations (default 3). |
| /D | Overwrite the name of an existing output file (whose contents would then be deleted). |
| /Q | Queries the user for a confirmation before renaming each of the input files. |




Although RENAME appears to have the same syntax as [COPY](copy_lit.md) (and [MOVE](move_lit.md)), it is restricted by the fact that the output file location must match the input file location. This is normally used on files in the current directory, eliminating the need to specify a device or PPN.

Note that RENAME recognizes filespecs ending in a period ( "." ) as indicating a file with no extension, rather than as a wildcard.

**History**

2026 July, A-Shell 7.0.1787:  COPY.LIT 3.4(150), MOVE.LIT 3.4(150), and RENAME.LIT 3.4(119) now support the same /ARC\{:#\} switch.

2019 June, A-Shell 6.5.1662:  RENAME.LIT 3.4(117) has been updated to accommodate a change in maximum filename.ext size, from 10.3 to 72.8.

2011 June, A-Shell 5.1.1221:  Remove the limit on the number of PPNs allowed per device.