Home » Image conversion » Convert BMP » Batch convert BMP to JPG

Batch convert BMP to JPG

This is a command line script to convert all BMP-files to JPEG/JPG. We will show you how to convert .BMP-files by right clicking on a folder. All the bmp-images will then be converted to jpg and saved in a sub folder (named ´jpg´). This tutorial will show you how to create a batch file with Irfanview command line commands and how to create a registry file to create an extra option in the context menu for converting bmp-files with one mouse click!

First, you have to download and install Irfanview (freeware) on your computer.  Just choose the standard options, install paths etc.

1. Create a batch file (name it "convertbmp.bat") using notepad.

This is what the batch file should look like:


cd %1
md jpg
move /y *.jpg* jpg\
for %%n in (bmp) do "%ProgramFiles%\IrfanView\i_view32.exe" *.%%n /convert=*.jpg /silent %1
move /y *.jpg* jpg\

2. Save this batch file as convertbmp.bat and copy it to the C:\Windows directory.

3. Create a .reg file (name it convertbmp.reg) using notepad.

This is what the reg-file should look like:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\convert_to_jpg]
@="Convert all bmp images to jpg"

[HKEY_CLASSES_ROOT\Folder\shell\convert_to_jpg\command]
@="C:\\WINDOWS\\convertbmp.bat \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\convert_to_jpg]
@="Convert all bmp images to jpg"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\convert_to_jpg\command]
@="C:\\WINDOWS\\convertbmp.bat \"%1\""


4. Save the file as convertbmp.reg.

5. Double click the convertbmp.reg file to add the registry file to your Windows registry.

6. Now, when you right click a folder that contains bmp-files, the context menu will show an extra option: "Convert all bmp images to jpg". If you select this option, all the bmp-files will be converted to jpg and saved in a sub folder (named jpg).