Ren (command)

Shell command for renaming a file or directory
title: "Ren (command)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["cp/m-commands", "internal-dos-commands", "msx-dos-commands", "os/2-commands", "reactos-commands", "windows-commands", "microcomputer-software", "windows-administration"] description: "Shell command for renaming a file or directory" topic_path: "technology/operating-systems" source: "https://en.wikipedia.org/wiki/Ren_(command)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Shell command for renaming a file or directory ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | ren / rename |
| screenshot | ReactOS-0.4.13 ren command 667x434.png |
| caption | The ReactOS ren command |
| developer | Various open-source and commercial developers |
| operating system | OpenVOS, RT-11, OS/8, RSX-11, ISIS-II, iRMX 86, TOPS-20, Z80-RIO, FLEX, CDOS, OS-9, FlexOS, PC-MOS, 4690 OS, MPE/iX, THEOS/OASIS, OpenVMS, CP/M, MP/M, TRIPOS, AmigaDOS, DOS, MSX-DOS, SISNE plus, OS/2, Windows, ReactOS, SymbOS, DexOS |
| platform | Cross-platform |
| genre | Command |
| :: |
| name = ren / rename
| logo =
| screenshot = ReactOS-0.4.13 ren command 667x434.png
| screenshot size =
| caption = The ReactOS ren command
| developer = Various open-source and commercial developers
| released =
| latest release version =
| latest release date =
| operating system = OpenVOS, RT-11, OS/8, RSX-11, ISIS-II, iRMX 86, TOPS-20, Z80-RIO, FLEX, CDOS, OS-9, FlexOS, PC-MOS, 4690 OS, MPE/iX, THEOS/OASIS, OpenVMS, CP/M, MP/M, TRIPOS, AmigaDOS, DOS, MSX-DOS, SISNE plus, OS/2, Windows, ReactOS, SymbOS, DexOS
| platform = Cross-platform
| genre = Command
| license =
| website =
ren (or rename) is a shell command for renaming a file and in some implementations (such as AmigaDOS) a directory.
Some shells with also provide a [move](move-command) 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, ren can move files.
::figure[src="https://upload.wikimedia.org/wikipedia/commons/c/c2/RT-11_help.jpg" caption="VT100]]."] ::
The command is in various shells such as COMMAND.COM, Command Prompt, 4DOS, 4NT and PowerShell. In MS-DOS, the command is available in versions 1 and later. In PowerShell, ren is a predefined alias for the Rename-Item Cmdlet which serves the same essential purpose.
Similar commands are available in many operating systems. The command is available in the CP/M, MP/M, Cromemco DOS, TRIPOS, OS/2, ReactOS, SymbOS, and DexOS. Multics 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, OS/8,"Concise Command Language" (CCL).{{cite web
|url=http://bitsavers.trailing-edge.com/pdf/dec/pdp8/os8/OS8_Handbook_Apr1974.pdf
|title=OS/8 Handbook |date=April 1974 |access-date=28 November 2017}} RSX-11, ISIS-II, iRMX 86, TOPS-20,{{cite web
|url=http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf
|title=TOPS-20 Command manual
|access-date=2018-07-18
|archive-date=2020-08-09
|archive-url=https://web.archive.org/web/20200809103116/http://www.textfiles.com/bitsavers/pdf/dec/pdp10/TOPS20/V6.1/AA-FP65A-TM_tops20CmdsRef.pdf
|url-status=dead
Example
The following renames file to .
::code[lang=doscon]
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.
::code[lang=doscon]
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
::code[lang=doscon]
rename "abcd*.txt" "////*.txt" ::
References
References
- (September 19, 1988). "AmigaDOS quick reference". Grand Rapids, Mi : Abacus.
- (11 September 2009). "Microsoft TechNet Rename (ren) article".
- (2003). "Running MS-DOS Version 6.22 (20th Anniversary Edition), 6th Revised edition". [[Microsoft Press]].
- (22 October 2009). "Microsoft TechNet PowerShell Rename-Item (ren) article".
- "Manual".
- Digital Research. (July 1981). "MP/M - Multi-Programming Monitor Control Program - User's Guide". [[Digital Research]].
- Digital Research. (1981-09-25). "MP/M-86 Operating System - User's Guide". [[Digital Research]].
- [http://www.hartetechnologies.com/manuals/Cromemco/CDOSv1.PDF CDOS USER'S MANUAL]
- "Manual".
- "JaTomes Help - OS/2 Commands".
- (3 January 2022). "reactos/reactos".
- "Multics Commands".
- "Manual".
- "RT-11 HELP FILE".
- John F. Pieper. (1987). "RSX A Guide for Users". Digital Equipment Corporation.
- [http://bitsavers.org/pdf/intel/ISIS_II/9800306-06_ISIS-II_Users_Guide_May81.pdf ISIS II Users Guide]
- [https://archive.org/details/bitsavers_inteliRMX1_19819263 iRMX™86 INTRODUCTION AND OPERATOR'S REFERENCE MANUAL For Release 6]
- "Z80-RIO OPERATING SYSTEM USER'S MANUAL".
- "FLEX 2.0 User's Manual".
- Paul S. Dayan. (1992). "The OS-9 Guru - 1 : The Facts". Galactic Industrial Limited.
- (1986). "FlexOS User's Guide".
- "Users guide".
- "MPE/iX Command Reference Manual".
- [http://www.bitsavers.org/pdf/phaseOneSystems/THEOS_OASIS_Users_Handbook_1985.pdf THEOS/OASIS User's Handbook]
- [https://www.itec.suny.edu/scsys/vms/OVMSDOC073/v73/6489/6489pro_005.html OpenVMS User's Manual]{{Dead link. (October 2022)
- (1980). "86-DOS - Disk Operating System for the 8086 - User's Manual". [[Seattle Computer Products, Inc.]].
- [https://www.4corn.co.uk/archive/docs/DR%20DOS%206.0%20User%20Guide-opt.pdf DR DOS 6.0 User Guide Optimisation and Configuration Tips]
- [https://github.com/roelandjansen/pcmos386v501/blob/master/DOCS/v4/PCMOSv4UserManual.pdf PC-MOS User Guide]
- Jansen, Roeland. (8 February 2018). "pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::