#! /bin/csh if ( ! -d jpg ) then mkdir jpg endif foreach file ( *.bmp ) convert $file jpg/${file:r}.jpg end