ren
(or
rename
) is a
shell
Shell may refer to:
Architecture and design
* Shell (structure), a thin structure
** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses
Science Biology
* Seashell, a hard outer layer of a marine ani ...
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* command (Unix), a Unix command
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on A ...
for
renaming a
file and in some implementations (such as
AmigaDOS
AmigaDOS is the disk operating system of the AmigaOS, which includes file systems, file and directory manipulation, the command-line interface, and file Redirection (computing), redirection.
In AmigaOS 1.x, AmigaDOS is based on a TRIPOS port by ...
) a
directory.
Some shells with also provide a
move
command that provides for moving between directories. On systems that do not support a
move
command (such as MS-DOS older than 6.00), the user could copy a file to a new destination and then delete the original file. In
DOSBox
DOSBox is a free and open-source MS-DOS emulator. It supports running programs primarily video games that are otherwise inaccessible since hardware for running a compatible disk operating system (DOS) is obsolete and generally unavailab ...
,
ren
can move files.

The command is in various shells such as
COMMAND.COM,
Command Prompt,
4DOS,
4NT and
PowerShell
PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
. In
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
, the command is available in versions 1 and later.
In
PowerShell
PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
,
ren
is a predefined
alias for the
Rename-Item
Cmdlet
PowerShell is a shell program developed by Microsoft for task automation and configuration management. As is typical for a shell, it provides a command-line interpreter for interactive use and a script interpreter for automation via a langu ...
which serves the same essential purpose.
Similar commands are available in many
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
s. The command is available in the
CP/M
CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
,
MP/M,
Cromemco DOS,
TRIPOS
TRIPOS (''TRIvial Portable Operating System'') is a computer operating system. Development started in 1976 at the Computer Laboratory of Cambridge University and it was headed by Dr. Martin Richards. The first version appeared in January 1978 a ...
,
OS/2
OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
,
ReactOS
ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
,
SymbOS, and DexOS.
Multics
Multics ("MULTiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of t ...
includes a
rename
command to rename a directory entry; which could be contracted to
rn
. A command which in some cases can be contracted to
ren
is provided in
Stratus VOS,
RT-11
RT-11 (Real-time 11) is a discontinued small, low-end, single-user real-time operating system for the full line of Digital Equipment Corporation PDP-11 16-bit computers. RT-11 was first implemented in 1970. It was widely used for real-time compu ...
,
OS/8,
["Concise Command Language" (CCL).] RSX-11
RSX-11 is a discontinued family of multi-user real-time operating systems for PDP-11 computers created by Digital Equipment Corporation. In widespread use through the late 1970s and early 1980s, RSX-11 was influential in the development of later ...
,
ISIS-II,
iRMX 86,
TOPS-20,
Z80-RIO,
FLEX,
OS-9,
FlexOS
FlexOS is a discontinued modular real-time multiuser multitasking operating system ( RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible Automation Business ...
,
4690 OS
4690 Operating System (sometimes shortened to 4690 OS or 4690) is a specially designed point of sale (POS) operating system, originally sold by IBM. In 2012, IBM sold its retail business, including this product, to Toshiba, which assumed support. ...
,
MPE/iX,
THEOS/OASIS, and
OpenVMS
OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
A
rename
command is supported by
86-DOS
86-DOS (known internally as QDOS, for Quick and Dirty Operating System) is a discontinued operating system developed and marketed by Seattle Computer Products (SCP) for its Intel 8086-based computer kit.
86-DOS shared a few of its commands wi ...
.
DR DOS 6.0 includes and commands.
[DR DOS 6.0 User Guide Optimisation and Configuration Tips](_blank)
/ref> PC-MOS includes an implementation of rename
. It is also available in the MS-DOS emulator
In computing, an emulator is Computer hardware, hardware or software that enables one computer system (called the ''host'') to behave like another computer system (called the ''guest''). An emulator typically enables the host system to run sof ...
DOSBox
DOSBox is a free and open-source MS-DOS emulator. It supports running programs primarily video games that are otherwise inaccessible since hardware for running a compatible disk operating system (DOS) is obsolete and generally unavailab ...
.
Example
The following renames file to .
> ren foo bar
The following renames a file specified by a fully qualified path. The first parameter may contain drive and path information, but the second parameter must be only a file name.
> rename "C:\Users\Public\Videos\Sample Videos\Wildlife.wmv" Wildlife2.wmv
The following removes abcd of a file name in Command Prompt based on the following rules:
* Same number of /
as the number of characters to remove
* Requries double quotes for both arguments
* Won't remove .
from a file name
> rename "abcd*.txt" "////*.txt"
See also
* List of DOS commands
* List of PowerShell commands
References
Further reading
*
*
*
External links
ren , Microsoft Docs
{{Windows commands
CP/M commands
Internal DOS commands
MSX-DOS commands
OS/2 commands
ReactOS commands
Windows commands
Microcomputer software
Windows administration