#!/bin/bash for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done echo "Removing spaces....Done" for f in *; do mv "$f" `echo $f | tr '[A-Z]' '[a-z]'`; done echo "Files all lowercase...Done" mkdir thumbs echo "Make thumbs dir...Done" echo "Create thumbnails and web view images..." for img in `ls *.jpg`; do echo "Next: $img" echo "...Making Web Sized" convert -resize 640x480 $img thumbs/web_$img echo "......Done" echo "...Making Thumbnail" convert -resize 120x160 thumbs/web_$img thumbs/thumb_$img echo "...Making Read-only" chmod 644 thumbs/*.jpg chmod 644 *.jpg echo "......Done" done echo "..........All Done"