Sideway
output.to from Sideway
Draft for Information Only

Content

MS DOS Command: REN (RENAME)
 Description
 Syntax
 Parameters
 Related Commands
 Remarks
  Using wildcards with RENAME
  RENAME will not work if filename2 already exists
 Examples

MS DOS Command: REN (RENAME)

Reference from Microsoft MS-DOS cmd help

Description

Changes the name of the file or files you specify.

You can rename all files matching the specified filename. You cannot use the RENAME command to rename files across drives or to move files to a different directory location. To rename subdirectories or move files, use the MOVE command.

Syntax

RENAME [drive:][path]filename1 filename2 REN [drive:][path]filename1 filename2

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

Related Commands

For information about renaming directories, see the MOVE command.

For information about renaming a disk, see the LABEL command.

For information about copying files to a different drive or directory, see the COPY command.

For information about copying entire directories to a new location, see the XCOPY command.

Remarks

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.


©sideway

ID: 110700246 Last Updated: 7/29/2011 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339

Travel 18

Reference 79

Computer

Hardware 254

Software

Application 213

Digitization 37

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019