CMD Master
Back to Blog
Arnošt Havelka

The Rename Command

Give files new names.

Start Interactive Lesson
The Rename Command

The Rename Command (ren)

The ren (or rename) command is straightforward: it changes the name of a file. It cannot move files to a different directory; for that, you need move.

Usage:ren
[filename]
[newname]
filename
The current name of the file.
newname
The new name for the file. Note: You cannot specify a new path here.

Real-World Examples

Simple rename:

Command Prompt
C:\Users\User>ren raw_data.csv data_2024.csv

Bulk rename extensions:

Command Prompt
C:\Users\User>ren *.htm *.html

Knowledge Check

1 / 2

Can 'ren' move a file to another folder?

Up Next

The Delete Command

Remove unwanted files forever.