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, e ...
,
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 commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
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
Command Prompt, also known as cmd.exe or cmd, is the default command-line interpreter for the OS/2, eComStation, ArcaOS, Microsoft Windows (Windows NT family and Windows CE family), and ReactOS operating systems. On Windows CE .NET 4.2, Windo ...
,
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-sourc ...
. 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)
In relational algebra, a rename is a unary operation written as \r ...
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 transfe ...
s 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 ...
) 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 u ...
. 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, and ot ...
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
Gov ...
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
![RT-11 help](https://upload.wikimedia.org/wikipedia/commons/c/c2/RT-11_help.jpg)
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 and ...
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/ 85-based microcomputers by Gary Kildall of Digital Research, Inc. Initial ...
,
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 us ...
,
Cromemco
Cromemco was a Mountain View, California microcomputer company known for its high-end Zilog Z80, 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 betwe ...
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
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicat ...
,
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 technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
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 serv ...
,
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 a ...
,
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 t ...
includes a
rename
command to rename a directory entry. It can be contracted to
rn
.
Stratus
Stratus may refer to:
Weather
*Stratus cloud, a cloud type
**Nimbostratus cloud, a cloud type
**Stratocumulus cloud, a cloud type
**Altostratus cloud, a cloud type
**Altostratus undulatus cloud, a cloud type
**Cirrostratus cloud, a cloud type
Mus ...
OpenVOS
Stratus VOS (Virtual Operating System) is a proprietary operating system running on Stratus Technologies fault-tolerant computer systems. VOS is available on Stratus's ftServer and Continuum platforms. VOS customers use it to support high-volume ...
,
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
OS/8 is the primary operating system used on the Digital Equipment Corporation's PDP-8 minicomputer.
PDP-8 operating systems which precede OS/8 include:
* R-L Monitor, also referred to as MS/8.
* P?S/8, requiring only 4K of memory.
* PDP-8 4K ...
,
["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. It is the world's largest semiconductor chip manufacturer by revenue, and is one of the developers of the x86 seri ...
ISIS-II,
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 PDP- ...
,
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
The Z80 Operating System with Relocatable Modules and I/O Management (Z80-RIO) is a general-purpose operating system developed by Zilog in the late 1970s for various computer systems including the ''Z80 Micro Computer System'' (MCZ-1) series and t ...
,
TSC TSC may refer to:
Organizations
* Technology Service Corporation, a US engineering company
* Terrorist Screening Center, a division of the National Security Branch of the US Federal Bureau of Investigation
* The Shopping Channel, a Canadian televi ...
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 comm ...
,
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 computer multitasking, multitasking operating system (RTOS) designed for computer-integrated manufacturing, laboratory, retail and financial markets. Developed by Digital Research's Flexible ...
, 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 system ...
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 Kild ...
'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 wit ...
. 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 ope ...
, 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-sourc ...
, 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 u ...
.
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 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 so ...
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 nearly ...
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 pro ...
* 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