In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, ...
,
ren
(or
rename
) is a
command
Command may refer to:
Computing
* Command (computing), a statement in a computer language
* COMMAND.COM, the default operating system shell and command-line interpreter for DOS
* Command key, a modifier key on Apple Macintosh computer keyboards
...
in various
command-line interpreter
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive command (computing), commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invokin ...
s (
shells) such as
COMMAND.COM
COMMAND.COM is the default command-line interpreter for MS-DOS, Windows 95, Windows 98 and Windows Me. In the case of DOS, it is the default user interface as well. It has an additional role as the usual first program run after boot (init proc ...
,
cmd.exe
,
4DOS
4DOS is a command-line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in Microsoft DOS and Windows. It was written by Rex C. Conn and Tom Rawson and first released in 1989. Compared to the default ...
,
4NT and
Windows PowerShell
PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-s ...
. It is used to
rename
Rename may refer to:
* Rename (computing), rename of a file on a computer
* RENAME (command), command to rename a file in various operating systems
* Rename (relational algebra), unary operation in relational algebra
* Company renaming, rename ...
computer file
A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and trans ...
s and in some implementations (such as
AmigaDOS) also
directories
Directory may refer to:
* Directory (computing), or folder, a file system structure in which to store computer files
* Directory (OpenVMS command)
* Directory service, a software application for organizing information about a computer network's ...
. It is analogous to the
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
mv
command. However, unlike
mv
,
ren
cannot be used to move files, as a new directory for the destination file may not be used. Alternatively,
move
Move may refer to:
People
* Daniil Move (born 1985), a Russian auto racing driver
Brands and enterprises
* Move (company), an online real estate company
* Move (electronics store), a defunct Australian electronics retailer
* Daihatsu Move
...
may be used if available. On versions of MS-DOS that do not support the
move
command (older than 6.00), the user would simply copy the file to a new destination, and then delete the original file. A notable exception to this rule is
DOSBox
DOSBox is a free and open-source emulator which runs software for MS-DOS compatible disk operating systems—primarily video games. It was first released in 2002, when DOS technology was becoming obsolete. Its adoption for running DOS games i ...
, in which
ren
may be used to move a file, since
move
is not supported.
Implementations

The command is available in the operating systems
Digital Research
Digital Research, Inc. (DR or DRI) was a company created by Gary Kildall to market and develop his CP/M operating system and related 8-bit, 16-bit and 32-bit systems like MP/M, Concurrent DOS, FlexOS, Multiuser DOS, DOS Plus, DR DOS ...
CP/M,
MP/M
MP/M (Multi-Programming Monitor Control Program) is a discontinued multi-user version of the CP/M operating system, created by Digital Research developer Tom Rolander in 1979. It allowed multiple users to connect to a single computer, each u ...
,
Cromemco
Cromemco was a Mountain View, California microcomputer company known for its high-end Z80-based S-100 bus computers and peripherals in the early days of the personal computer revolution.
The company began as a partnership in 1974 between Harry Ga ...
CDOS,
MetaComCo TRIPOS
At the University of Cambridge, a Tripos (, plural 'Triposes') is any of the examinations that qualify an undergraduate for a bachelor's degree or the courses taken by a student to prepare for these. For example, an undergraduate studying mathe ...
,
DOS,
IBM OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
,
Microsoft
Microsoft Corporation is an American multinational corporation, multinational technology company, technology corporation producing Software, computer software, consumer electronics, personal computers, and related services headquartered at th ...
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
,
ReactOS
ReactOS is a free and open-source operating system for amd64/ i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted ...
,
SymbOS
SYmbiosis Multitasking Based Operating System (SymbOS) is a multitasking operating system for Zilog Z80-based 8-bit computer systems.
Contrary to early 8-bit operating systems it is based on a microkernel, which provides preemptive and prior ...
, 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 ...
includes a
rename
command to rename a directory entry. It can be contracted to
rn
.
Stratus OpenVOS,
DEC 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 computin ...
,
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 ...
,
Intel
Intel Corporation is an American multinational corporation and technology company headquartered in Santa Clara, California, Santa Clara, California. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the devel ...
ISIS-II
ISIS, short for Intel System Implementation Supervisor, is an operating system for early Intel microprocessors like the 8080. It was originally developed by Ken Burgett and Jim Stein under the management of Steve Hanna and Terry Opdendyk for the ...
,
iRMX 86,
TOPS-20
The TOPS-20 operating system by Digital Equipment Corporation (DEC) is a proprietary OS used on some of DEC's 36-bit mainframe computers. The Hardware Reference Manual was described as for "DECsystem-10/DECSYSTEM-20 Processor" (meaning the DEC PD ...
,
Zilog
Zilog, Inc. is an American manufacturer of microprocessors and 8-bit and 16-bit microcontrollers. It is also a supplier of application-specific embedded system-on-chip (SoC) products.
Its most famous product is the Z80 series of 8-bit microp ...
Z80-RIO,
TSC FLEX
Flex or FLEX may refer to:
Computing
* Flex (language), developed by Alan Kay
* FLEX (operating system), a single-tasking operating system for the Motorola 6800
* FlexOS, an operating system developed by Digital Research
* FLEX (protocol), a ...
,
Microware
Microware Systems Corporation was an American software company based in Clive, Iowa, that produced the OS-9 real-time operating system.
Microware Systems Corporation existed as a separate entity from 1977 until September 2001, when it was bought ...
OS-9
OS-9 is a family of real-time, process-based, multitasking, multi-user operating systems, developed in the 1980s, originally by Microware Systems Corporation for the Motorola 6809 microprocessor. It was purchased by Radisys Corp in 2001, and ...
, DR
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 U ...
, IBM/
Toshiba
, commonly known as Toshiba and stylized as TOSHIBA, is a Japanese multinational conglomerate corporation headquartered in Minato, Tokyo, Japan. Its diversified products and services include power, industrial and social infrastructure systems ...
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. ...
,
HP 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 Ope ...
also provide the
rename
command which in some cases can be contracted to
ren
.
The
rename
command is supported by
Tim Paterson
Tim Paterson (born 1 June 1956) is an American computer programmer, best known for creating 86-DOS, an operating system for the Intel 8086. This system emulated the application programming interface (API) of CP/M, which was created by Gary K ...
's
SCP
SCP may refer to:
Organizations Political parties
* Soviet Communist Party, the leading political party in the former Soviet Union
* Syrian Communist Party
* Sudanese Communist Party
* Scottish Christian Party
Companies
* Seattle Computer Produ ...
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 ...
. On
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 oper ...
, the command is available in versions 1 and later.
DR DOS 6.0
DR-DOS (written as DR DOS, without a hyphen, in versions up to and including 6.0) is a disk operating system for IBM PC compatibles. Upon its introduction in 1988, it was the first DOS attempting to be compatible with IBM PC DOS and MS-D ...
also includes an implementation of the and commands.
[DR DOS 6.0 User Guide Optimisation and Configuration Tips](_blank)
/ref>
In Windows PowerShell
PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-s ...
, ren
is a predefined command alias for the Rename-Item
Cmdlet which basically serves the same purpose.
TSL PC-MOS
PC-MOS/386 is a multi-user, multitasking computer operating system produced by The Software Link (TSL), announced at COMDEX in November 1986 for February 1987 release. PC-MOS/386, a successor to PC-MOS, can run many MS-DOS programs on the host ...
includes an implementation of rename
.
Like the rest of the operating system, it is licensed under the GPL v3
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general ...
.
It is also available in the open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. The open-source model is a decentralized sof ...
MS-DOS emulator
In computing, an emulator is 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 software or use peri ...
DOSBox
DOSBox is a free and open-source emulator which runs software for MS-DOS compatible disk operating systems—primarily video games. It was first released in 2002, when DOS technology was becoming obsolete. Its adoption for running DOS games i ...
.
Example
ren filename newname
ren *.htm *.html
Another example. This will rename a default video found in Windows 7
Windows 7 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on July 22, 2009, and became generally available on October 22, 2009. It is the successor to Windows Vista, released nearl ...
with a new name:
rename "C:\Users\Public\Videos\Sample Videos\Wildlife.wmv" "Wildlife2.wmv"
The first parameter ''may'' contain a drive and a path, but the second parameter must contain only the new filename.
To remove certain characters of a file name in Microsoft Windows command prompt (XP & Higher) :
rename "abcd*.txt" "////*.txt"
This will remove ''abcd'' from the file name.
Notes:
# Same number of /
as the number of initial characters to remove.
# Double quotes for both arguments.
# It doesn't remove .
from file name
See also
*List of DOS commands
This article presents a list of commands used by DOS operating systems, especially as used on x86-based IBM PC compatibles (PCs). Other DOS operating systems are not part of the scope of this list.
In DOS, many standard system commands were p ...
* 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