Win10: Resize all selected files via send-to bat file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dnisn
Posts: 4
Joined: 2019-06-16T11:32:34-07:00
Authentication code: 1152

Win10: Resize all selected files via send-to bat file

Post by dnisn »

Hello,
I'm on windows 10, ImageMagick-7.0.8-Q16

At the moment, when I resize pictures, I right-click on a picture,
choose "sent to" >> resize.bat , that has the following code

Code: Select all

magick mogrify -path "E:\1920px" -resize 1920x1920 -density 300 -quality 90 *
This resizes all pictures in the folder. When I only want to resize, let's say 5 selected
pictures, I know that I need to use the "convert" command. But somehow I don't get IM to resize
the selected files :(

Thanks for your help!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Win10: Resize all selected files via send-to bat file

Post by snibgo »

I suggest a BAT script something like this:

Code: Select all

echo Arg   = %*
echo CD    =%CD%
pause
:loop
if "%1"=="" (
  echo Finished
  pause
  exit
)
echo %1
magick %1 -resize 1920x1920 -quality 90 %1
shift
pause
goto loop
snibgo's IM pages: im.snibgo.com
dnisn
Posts: 4
Joined: 2019-06-16T11:32:34-07:00
Authentication code: 1152

Re: Win10: Resize all selected files via send-to bat file

Post by dnisn »

Thank you very much!!! This works great!
Post Reply