Apr 112013
 

Hi there,

here a script that wl resize images (to 25% of original size) and moves the resized images o a folder called „25Prozent“:

#!/bin/bash

cd $1
echo "Starting Script for resizing Images to 25% of the origin size"
echo "Creating folder -> 25Prozent <-"
mkdir 25Prozent
echo "Folder created"
echo "*** Start resizing images ***"
for i in *.JPG;do convert $i -resize 25% -quality 95 25Prozent/$i;echo $i;done
for i in *.jpg;do convert $i -resize 25% -quality 95 25Prozent/$i;echo $i;done
echo "*** Finished resizing images ***"
echo "exit and good bye..."

Instead of

for i in *.JPG;do ....
for i in *.jpg;do ...

You can also use:

for i in $(find . -iname "*.jpg")

Thx to Timo for this information 😉

Sorry, the comment form is closed at this time.