Batch Change File Extension

Change file extensionUsing the same method as how we batch rename files, we can also change the file extensions of a series of files easily, without the need of any software. All you need is a Notepad or any other text editor.

4 Easy Steps:

Step 1
Place all the files that you want to change their file extension in the same folder or directory (make sure they have the same extension, all .png for example).

Step 2
Open Notepad and type the following command line:

ren *.abc *.def

.abc is the initial file extension, while .def is the file extension you want to change to. Say you want to change the file extensions of a batch of files, from .png to .gif, use:

ren *.png *.gif

ren *.png *.gif

Step 3
After entering the command line, save it as rename.bat to the same folder or directory where the files you wanted to change their file extension is located. Make sure you select “All Files” in the “Save as type”, instead of “Text Documents (*.txt)“.

Save as rename.bat

Step 4
Run (double-click) the rename.bat you’ve saved in Step 3. Voila!

— — — — — —

Using this method to change file extensions will really only change the file extension/file format/file type. It is purely renaming the file extension, not converting the file type.

Note: The number of character of the file extension must be the same before and after rename. But since most of the file extensions are of 3 characters (jpg, png, gif etc.), most probably there shouldn’t be a problem.

(image source)

#command line#ms-dos#rename#tips

Comments

  1. Robert - March 13, 2009 @ 12:09 pm

    What if I want to remove the file extension all together?

    In my job, I export artwork to a tif format, but in order for it to be viewable in the Electronic Parts Catalog, I have to remove the file extension.

    I then place the renamed file into it’s appropriate folder. I still want to do this part manually, as it allows me monitor Quality Control.

  2. Dan - March 13, 2009 @ 11:38 pm

    That is the best thing I have ever seen. You saved me 2 hours+ of tedious file renaming.

    Long live DOS! Way to go sheeptech!

  3. Abhay - March 30, 2009 @ 9:16 pm

    i have a very large music and movie collection ,stored in various folders ,all of them have been transformed into .jpg by a software that automatically detects all pictures.i want to transform them into mp3 and respective files again. the process enlisted is too tedious .please suggest some other

  4. zoki pokeski - July 9, 2009 @ 10:17 am

    Thanks a lot…
    This was big help for me…

  5. vijay - September 3, 2009 @ 9:16 pm

    Hi! It does’t work for vista

  6. Ryan - September 11, 2009 @ 2:48 pm

    Excellent. Im very grateful to you! It worked on Vista HP for me.

  7. Zom - July 9, 2010 @ 6:23 pm

    *Bows to your greatness* This saved me hours of work. So simple..

  8. Sarah - August 28, 2010 @ 5:06 am

    This is so helpful, I come back to this over and over again when creating thumbnails for our online photo gallery.

  9. Vincent - August 28, 2010 @ 2:00 pm

    Glad that you guys find it helpful 🙂

  10. Sunny Rai - May 25, 2011 @ 6:28 pm

    Thanks alot, you just saved me a good few hours of file renaming, and your the first person to make it simple!

    • Shannon - July 10, 2011 @ 11:52 am

      @Sunny Rai, I agree. My head was swimming looking at all the different programs. This was dead simple. THANK YOU!

Leave a Reply

Your email address will not be published / Required fields are marked *