Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rename(CMD) — OpenDesktop 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought


 rename(CMD)                     19 June 1992                     rename(CMD)


 Name

    rename (ren) - change the name of a file or files

 Syntax


    rename [drive:][path]filename1 filename2

    ren [drive:][path]filename1 filename2


 Description

    You can rename all files matching the specified filename.  You cannot use
    the rename command to rename files across drives, to move files to a dif-
    ferent directory location, or to rename subdirectories.

 Parameters


    [drive:][path]filename1
                Specifies the location and name of the file or set of files
                you want to rename.

    filename2   Specifies the new name for the file or, if you use wildcards,
                the new names for the files.  (You cannot specify a new drive
                or path.)


 Notes


    Using wildcards with rename

    You can use wildcards (* and ?) in either filename parameter.  If you use
    wildcards in filename2, the characters represented by the wildcards will
    be identical to the corresponding characters in filename1.

    Rename will not work if filename2 already exists

    If, for filename2, you specify a filename that already exists, rename
    displays the following message:

       Duplicate file name or file not found


 Examples

    Suppose you want to change the extensions of all the filenames in the
    current directory that have the extension .TXT; for example, suppose you
    want to change the .TXT extensions to .DOC extensions.  To make this
    change, type the following command:

       ren *.txt *.doc


    To rename a file named CHAP10 (on drive B) to PART10, type the following
    command:

       ren b:chap10 part10


    The newly renamed file PART10 remains on drive B.

 Related commands

    For information about renaming a disk, see the label(CMD) command.

    For information about copying files to a different drive or directory,
    see the copy(CMD) command.

    For information about copying entire directories to a new location, see
    the xcopy(CMD) command.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026