ren (command)
Cross-platform | |
Type | Command |
---|
In
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
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 DOSBoxren
may be used to move a file, since move
is not supported.
Implementations
The command is available in the operating systems Digital Research CP/M,[2] MP/M,[3][4] Cromemco CDOS,[5] MetaComCo TRIPOS,[6] DOS, IBM OS/2,[7] Microsoft Windows,[8] ReactOS,[9] SymbOS, and DexOS.
Multics includes a rename
command to rename a directory entry. It can be contracted to rn
.[10]
Stratus OpenVOS,[11] DEC RT-11,[12] OS/8,[13] RSX-11,[14] Intel ISIS-II,[15] iRMX 86,[16] TOPS-20,[17] Zilog Z80-RIO,[18] TSC FLEX,[19] Microware OS-9,[20] DR FlexOS,[21] IBM/Toshiba 4690 OS,[22] HP MPE/iX,[23] THEOS/OASIS,[24] and OpenVMS[25] also provide the rename
command which in some cases can be contracted to ren
.
The rename
command is supported by
In
ren
is a predefined command alias for the Rename-Item
Cmdlet which basically serves the same purpose.[29]rename
.[30]It is also available in the open source MS-DOS emulator DOSBox.
Example
>ren filename newname
>ren *.htm *.html
Another example. This will rename a default video found in Windows 7 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
- List of PowerShell commands
References
- ISBN 9781557550491– via Internet Archive.
- ^ "Manual" (PDF). www.cpm.z80.de. Retrieved 2020-09-19.
- ^ Digital Research (July 1981) [1979]. MP/M - Multi-Programming Monitor Control Program - User's Guide (PDF) (4 ed.). Pacific Grove, CA, USA: Digital Research. Archived (PDF) from the original on 2017-01-04. Retrieved 2017-01-04.
- ^ Digital Research (1981-09-25). MP/M-86 Operating System - User's Guide (PDF) (1 ed.). Pacific Grove, CA, USA: Digital Research. Archived (PDF) from the original on 2017-01-04. Retrieved 2017-01-04.
- ^ CDOS USER'S MANUAL
- ^ "Manual" (PDF). www.pagetable.com. Retrieved 2020-09-19.
- ^ "JaTomes Help - OS/2 Commands". Archived from the original on 2019-04-14. Retrieved 2019-07-06.
- ^ "Microsoft TechNet Rename (ren) article". 11 September 2009.
- ^ "reactos/reactos". GitHub. 3 January 2022.
- ^ "Multics Commands". www.multicians.org.
- ^ "Manual" (PDF). stratadoc.stratus.com. Retrieved 2020-09-19.
- ^ "RT-11 HELP FILE". paleoferrosaurus.com. Archived from the original on 2018-07-17. Retrieved 2018-07-16.
- ^ "Concise Command Language" (CCL)."OS/8 Handbook" (PDF). April 1974. Retrieved 28 November 2017.
- ISBN 0-932376-90-8. Retrieved 2020-09-19.
- ^ ISIS II Users Guide
- ^ iRMX™86 INTRODUCTION AND OPERATOR'S REFERENCE MANUAL For Release 6
- ^ "TOPS-20 Command manual" (PDF). Archived from the original (PDF) on 2020-08-09. Retrieved 2018-07-18.
- ^ Z80-RIO OPERATING SYSTEM USER'S MANUAL
- ^ "FLEX 2.0 User's Manual" (PDF).
- ISBN 0-9519228-0-7.
- ^ "FlexOS User's Guide" (PDF). www.bitsavers.org. 1986. Archived from the original (PDF) on 2010-08-08. Retrieved 2020-09-19.
- ^ "Users guide" (PDF). archive.org. Retrieved 2020-09-19.
- ^ "MPE/iX Command Reference Manual" (PDF). Archived from the original (PDF) on 2018-10-21. Retrieved 2018-10-21.
- ^ THEOS/OASIS User's Handbook
- ^ OpenVMS User's Manual[permanent dead link]
- Seattle Computer Products, Inc. 1980. Archived from the original(PDF) on 2019-07-14. Retrieved 2019-07-14. (59 pages)
- ISBN 0-7356-1812-7.
- ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips
- ^ "Microsoft TechNet PowerShell Rename-Item (ren) article". 22 October 2009.
- ^ PC-MOS User Guide
- ^ Jansen, Roeland (8 February 2018). "pcmos386v501: PC-MOS/386 v5.01 final release including cdrom driver sources" – via GitHub.
Further reading
- Wolverton, Van (1990). MS-DOS Commands: Microsoft Quick Reference, 4th Revised edition. ISBN 978-1556152894.
- Kathy Ivens; Brian Proffit (1993). OS/2 Inside & Out. ISBN 978-0078818714.
- Frisch, Æleen (2001). Windows 2000 Commands Pocket Reference. ISBN 978-0-596-00148-3.