Or: --- cut here --- #!/bin/sh # Specify file type here type=jpg # Specify marker for changed files here mark='-out' for file in $PWD/*.$type do { filein=`basename $file` fileout=`basename $file .$type`$mark.$type echo -n Processing $filein... imagemagick -rotate 90 $filein $fileout || exit 1 echo done. } done --- cut here --- Not sure about the imagemagick command line syntax, but you'll figure it out. HTH ;) -- Philip Lehman <lehman@gmx.net>