REM convert_grub.bat @echo off REM Place this file in the directory where the files to be converted are located. REM Drag and drop single or multiple 640x480 (or with the same aspect ratio) .png or .bmp images into this batch file to convert them to GRUB or Grub4Dos compatible splash images with ImageMagick. The converted file(s) will have "_splash" appended after the name and the extension(s) changed to xpm.gz. This script works for files only (it will not work for folders). Tested on Vista and WinXP with ImageMagick portable installed to C:\Utilities folder. REM "%~dp0" changes the working directory to the current directory (where this batch file is located) REM "%~n1" is the filename minus the extension CD "%~dp0" echo. echo Current directory is: "%~dp0" echo. :Loop IF [%1]==[] goto continue C:\Utilities\ImageMagick\convert -resize 640x480 -colors 14 %1 "%~n1"_splash.xpm.gz echo "%~nx1 converted to xpm.gz" SHIFT goto Loop :continue echo. echo "All conversions completed" echo. @pause