Skip to content

Instantly share code, notes, and snippets.

@matt-the-ogre
Created March 7, 2023 19:48
Show Gist options
  • Save matt-the-ogre/9719a1f40cef06c7528ba3a0331ca444 to your computer and use it in GitHub Desktop.
Save matt-the-ogre/9719a1f40cef06c7528ba3a0331ca444 to your computer and use it in GitHub Desktop.
A drag-and-drop batch file for Windows that uses ImageMagick to convert images to JPEG format
@echo off
REM Loop through all the filenames passed to the script
REM requires installation of ImageMagick to work
for %%i in (%*) do (
REM Do something with the filename (e.g., print it to the console)
echo %%i
magick mogrify -format jpg %%i
)
REM Pause to keep the console window open after the script finishes
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment