Bulk Change Image File Extensions from Command Line Prompt

Command Prompt Change File Extensions
Command Prompt Change File Extensions

Here I have found a quick way to change image file extensions in bulk using the command prompt in Windows.

I discovered a quick way to change all the images in a folder from .jpg to .bmp using the command line. Unfortunately this does not change the format of the image, only the extension 🙁

Change Image File Extensions
Change Image File Extensions Quickly and Easily

Change Image File Extensions Quickly and Effortlessly

  • In Windows 10 click in the ‘Search Windows’ box at the bottom left hand corner of the screen
  • Type: cmd and hit enter
  • You need to navigate to the folder containing the images to be changed, so to do this type: cd http://filepath
  • You should now see the command prompt at your desired location.
  • Type ren *.jpg *.bmp

This Trick Works With All File Formats

  • Change Image File Extensions from .png to .jpg
  • Type ren *.png *.jpg

Why Ren?

You can use ren (as in rename):

ren *.XXX *.YYY

change XXX and YYY for the appropriate extensions. It will change from XXX to YYY. If you want to change all extensions, just use the wildcard again:

ren *.* *.YYY

Once you hit return, wait for the cursor to start blinking again, indicating that it has finished working.

Check your folder and you’ll see the results.

Automate The Process To Change Image File Extensions

You can also automate this process to Change Image File Extensions, or add this automated process into your bot with the help of another free plugin called Advanced Shell by UbotDev, which can be downloaded here: http://ubotdev.com/free-plugin-advanced-shell

The command is called ‘Shell Batch’ and this is the code you need:
plugin command("Advanced Shell.dll", "shell batch", "c:
cd \\Images\\
ren *.bmp *.jpg", "No")

This code navigates to this folder  C:\Images\ so you would change the ‘shell batch’ code to reflect the location of your Images folder.

Be the first to comment

Leave a Reply

Your email address will not be published.