Skip to content

Batch Script Renaming Folders

Learn how to rename folders in Windows using the ren or rename command in batch scripts with practical examples.

Batch Script offers the ren or rename command to rename folders.

rename [drive:][path][directoryname1 | filename1] [directoryname2 | filename2]

Examples

Let's look at some examples of renaming folders.

The following command will rename the folder called Example in the current working directory to Example1.

ren Example Example1

The following command will rename the folder called Example in C Drive to Example1.

ren C:\Example Example1
Navigation