ren (command)

From Wikipedia, the free encyclopedia
(Redirected from RENAME (DOS command))
Jump to navigation Jump to search
ren / rename
DevelopersVarious open-source and commercial developers
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemOpenVOS, 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
    PlatformCross-platform
    TypeCommand

    ren (or rename) is a shell command for renaming a file and in some implementations (such as AmigaDOS[1]) a directory.

    Some shells with ren also provide a move 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.

    File:RT-11 help.jpg
    Description of the RENAME command of RT-11SJ displayed on a VT100.

    The command is in various shells such as COMMAND.COM, Command Prompt,[2] 4DOS, 4NT and PowerShell. In MS-DOS, the command is available in versions 1 and later.[3] In PowerShell, ren is a predefined alias for the Rename-Item Cmdlet which serves the same essential purpose.[4]

    Similar commands are available in many operating systems. The command is available in the CP/M,[5] MP/M,[6][7] Cromemco DOS,[8] TRIPOS,[9] OS/2,[10] ReactOS,[11] SymbOS, and DexOS. Multics includes a rename command to rename a directory entry, which could be contracted to rn.[12] A rename command which in some cases can be contracted to ren is provided in Stratus VOS,[13] RT-11,[14] OS/8,[15] RSX-11,[16] ISIS-II,[17] iRMX 86,[18] TOPS-20,[19] Z80-RIO,[20] FLEX,[21] OS-9,[22] FlexOS,[23] 4690 OS,[24] MPE/iX,[25] THEOS/OASIS,[26] and OpenVMS[27] A rename command is supported by 86-DOS.[28] DR DOS 6.0 includes ren and rename commands.[29] PC-MOS includes an implementation of rename.[30][31] It is also available in the MS-DOS emulator DOSBox.

    Example

    [edit | edit source]

    The following renames file foo to bar.

    > 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.

    > 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
    > rename "abcd*.txt" "////*.txt"
    

    See also

    [edit | edit source]

    References

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ CDOS USER'S MANUAL
    9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    10. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    15. ^ "Concise Command Language" (CCL).Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    17. ^ ISIS II Users Guide
    18. ^ iRMX™86 INTRODUCTION AND OPERATOR'S REFERENCE MANUAL For Release 6
    19. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    24. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    26. ^ THEOS/OASIS User's Handbook
    27. ^ OpenVMS User's Manual[permanent dead link]
    28. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value). (59 pages)
    29. ^ DR DOS 6.0 User Guide Optimisation and Configuration Tips
    30. ^ PC-MOS User Guide
    31. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Further reading

    [edit | edit source]
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    • Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    [edit | edit source]