Ren (command)
Encyclopedia
In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...

, ren (or rename) is a command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

 in various DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

, OS/2
OS/2
OS/2 is a computer operating system, initially created by Microsoft and IBM, then later developed by IBM exclusively. The name stands for "Operating System/2," because it was introduced as part of the same generation change release as IBM's "Personal System/2 " line of second-generation personal...

 and Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 command line interpreters (shells
Shell (computing)
A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. However, the term is also applied very loosely to applications and may include any software that is "built around" a particular component, such as web...

) such as COMMAND.COM
COMMAND.COM
COMMAND.COM is the filename of the default operating system shell for DOS operating systems and the default command line interpreter on Windows 95, Windows 98 and Windows Me...

, cmd.exe
Cmd.exe
Command Prompt is the Microsoft-supplied command-line interpreter on OS/2, Windows CE and on Windows NT-based operating systems...

, 4DOS
4DOS
4DOS is a command line interpreter by JP Software, designed to replace the default command interpreter COMMAND.COM in DOS and Windows 95/98/Me. The 4DOS family of programs are meant to replace the default command processor. 4OS2 and 4NT replace CMD.EXE in OS/2 and Windows NT respectively...

/4NT
4NT
Take Command Console , formerly known as 4DOS for Windows NT and 4NT, is a command line interpreter by JP Software, designed as a substitute for the default command interpreter in Microsoft Windows...

 and Windows PowerShell
Windows PowerShell
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework...

. It is used to rename files
Computer file
A computer file is a block of arbitrary information, or resource for storing information, which is available to a computer program and is usually based on some kind of durable storage. A file is durable in the sense that it remains available for programs to use after the current program has finished...

 and in some implementations also directories
Directory (file systems)
In computing, a folder, directory, catalog, or drawer, is a virtual container originally derived from an earlier Object-oriented programming concept by the same name within a digital file system, in which groups of computer files and other folders can be kept and organized.A typical file system may...

. It is analogous to the Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 mv
Mv
mv is a Unix command that moves one or more files or directories from one place to another. Since it can "move" files from one filename to another, it is also used to rename files. Using mv requires the user to have write permission for the directories which the file will move between...

command. RT-11
RT-11
RT-11 was a small, single-user real-time operating system for the Digital Equipment Corporation PDP-11 family of 16-bit computers...

, RSX-11
RSX-11
RSX-11 is a family of real-time operating systems mainly for PDP-11 computers created by Digital Equipment Corporation , common in the late 1970s and early 1980s. RSX-11D first appeared on the PDP-11/40 in 1972...

 and OpenVMS
OpenVMS
OpenVMS , previously known as VAX-11/VMS, VAX/VMS or VMS, is a computer server operating system that runs on VAX, Alpha and Itanium-based families of computers. Contrary to what its name suggests, OpenVMS is not open source software; however, the source listings are available for purchase...

 also provide the rename command which can be contracted to ren.

In Windows PowerShell
Windows PowerShell
Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework...

, ren is a predefined command alias for the Rename-Item Cmdlet which basically serves the same purpose.

In Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

a similar command is rename.

Example


ren filename newname
ren *.htm *.html



Another example, however you are not advised to actually do this

ren filename newname
ren c:\windows\system32\authui.dll authui2.dll


Similar use in Unix:


rename s/filename/newname/ input_filter
rename s/(.*)\.htm$/$1.html/ *
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK