#!/bin/bash
#
# convert_res.sh						2002/2003
#
# (GPL) Marno van der Molen - marno.vandermolen@gmail.com
#
# Converts to a certain res, and puts in corresponding folder
#

RES='1600x1200' # Enter the resolution it should convert to here

#clear
mkdir $RES
echo -e "Converting images in this directory to $RES, and placing them in $PWD/$RES\n"

for FILE in `ls *.JPG`
do
	echo -n "Now converting $FILE..."
	convert -scale $RES $FILE $RES/$FILE
	echo " succes!"
done
echo -e "\n"

if [ $? == "0" ]
then
	echo "All went well!"
else
	echo "Something went wrong, but I don't know why..."
fi

