Windows Ren Command Tutorial with Examples To Rename Files and Folders – POFTUT

Windows Ren Command Tutorial with Examples To Rename Files and Folders


Windows ren command is used to rename files and folder. ren command provides command line renaming in MS DOS or cmd.exe.

Rename File

The most simple usage of ren command is renaming one file. In this example we will provide the source or original file name and destination or new file name. Original file name is myfile and new file name is yourfile .

> ren myfile  yourfile

Rename Multiple Files

If we have bulk list of files running ren one by one is very trivial task. renre command support renaming multiple files in a single shot. This is generally used to change extension of files.

In this example we will rename all *.bak extensions to the *.txt files.

> ren *.bak  *.txt

Rename Directory

As well as directories can be renamed with ren command. This is the same as renaming file. In this example we will rename file named test into mytest .

>ren test mytest

Using Quotes

While working with different files and folders names we should take attention the names with spaces. Space is interpreter differently in MS DOS. So to make ren command operations more  safely we can surround files and directory names with " double quotes.

> ren "My File" "Your File"

LEARN MORE  How To Check Whether A File Exists Using Python?

1 thought on “Windows Ren Command Tutorial with Examples To Rename Files and Folders”

  1. I use, Batch Rename Files Tool. You can easily found hier go to google and type BatchRenameFiles and check the first result that allows you to quickly rename all the files in a specified directory.

    Reply

Leave a Comment