How To Rename File Extension in Bulk

How to Rename File Extension in Bulk? Change Multiple Files Type In 1 Line on Command Prompt

Rename file extension in bulk: As technology becomes an integral part of our daily lives, we find ourselves constantly dealing with various file types. Sometimes, we might need to change the file extensions of multiple files at once for various reasons, such as standardizing file formats or ensuring compatibility. If you\’re a Windows user, fret not! In this blog post, we\’ll explore a nifty trick that allows you to change file extensions of multiple files simultaneously using the Command Prompt (CMD).

Step-by-Step Guide: Rename File Extension in Bulk. Change Multiple Files Extension in 1 Click

Before we begin, please note that changing file extensions can potentially render the files unusable if done incorrectly. It\’s crucial to proceed with caution and make backups of your files before attempting any mass renaming.

Step 1: Open the Command Prompt

To get started, open the Command Prompt on your Windows computer. You can do this by pressing the Windows key, typing \”cmd,\” and hitting Enter. The Command Prompt window will appear, ready for your commands. Also, you can open the command prompt after navigating to the directory where you want to perform renaming.

Step 2: Navigate to the Directory

Next, navigate to the directory containing the files you wish to rename. You can use the \”cd\” command to change directories. For example, if your files are in \”C:\\Users\\YourUsername\\Documents,\” type the following command and press Enter:

Command: cd C:\\Users\\YourUsername\\Documents

Step 3: Display Current File Extensions


Before making any changes, it\’s wise to ensure you know the current extensions of the files in the directory. To list all the files and their extensions, enter the following command:

Command: dir /B .

This will display a list of all the files in the directory without additional information.

Step 4: Rename Files with the New Extension

Now, let\’s dive into the file renaming process! The \”ren\” command is used to change the file extensions. The syntax for this command is as follows:

Command: ren \”old_filename.extension\” \”new_filename.extension\”

Replace \”old_filename.extension\” with the current filename and extension, and \”new_filename.extension\” with the desired filename and extension.

For example, to change a file named \”document.txt\” to \”report.docx,\” use the following command:

Command: ren document.txt report.docx

Step 5: Rename File Extension in Bulk

If you have multiple files with the same extension that you want to change, the wildcard character (*) comes to the rescue. It helps match multiple files at once and is an efficient way to rename files in bulk.

For instance, if you wish to change all \”.pdf\” files to \”.txt,\” use the following command:

Command: ren *.pdf *.txt


This command will change the extension of all .pdf files in the directory to .txt.


Step 6: Batch Renaming with a Loop

What if you have a large number of files with various extensions? Fear not, as we can use a loop in the Command Prompt to batch rename files. The loop will automatically process each file one by one, allowing you to change the extensions for multiple files.


for %i in (*.txt) do (
    ren \"%i\" \"%~ni.docx\"

If you are unable to type this command on your command prompt window then type it somewhere and copy and paste into command prompt.

In this example, all .txt files will be renamed to the same filename but with the .docx extension.

Video: Rename File Extension in Bulk

In case you don\’t understand the above steps then please follow the same procedure as shown in this video tutorial. Hope you will now be able to rename all your incorrect file extensions to the correct extension all at once.

Conclusion: Rename File Extension in Bulk

Changing file extensions of multiple files at once using CMD is a powerful technique that can save you time and effort. However, it\’s essential to be cautious and verify your changes to avoid potential data loss or damage.

We hope this step-by-step guide has been helpful to you! Now you have the know-how to navigate the Command Prompt and efficiently modify file extensions for various files. Remember to use this knowledge responsibly, and always back up your files before making any mass changes.

If you found this article on \”Rename File Extension in Bulk\” helpful, feel free to share it with others who might benefit from this trick. Stay tuned to our blog for more useful tech tips and tutorials! Happy file management!

Learn how to install the Realtek audio console on Windows 11, learn how to fix \”Hard disk not showing on a new computer but working on old computer\”

Don\’t forget to follow and subscribe to us on Google News and check out this video on YouTube.

Share this post with ❤️

iMiMDesign™ Co.
iMiMDesign™ Co.

iMiMDesign™ Co. specialized in providing Website Design & Development, Website To App Development, Graphic Designing, Digital Marketing, Animated Video Editing, Printing Services and many more.

Articles: 62

Newsletter Updates

Subscribe to the iMiMDesign™ Co. newsletter for exclusive design tips, latest trends, and special offers delivered weekly to your inbox!

Leave a Reply