find /yourdir -iname *.bmp -exec convert {} {}.jpg \;
Of course, if all the images are in a single subdirectory then a for loop would be better because you can do more variable substitution inside.
Something like this:
for file in /dir/*.bmp /dir/*.BMP
do
bname=${file%.}
convert ${file} ${bname}.jpg
done
That's in a sh-oriented syntax. Switching to csh is pretty simple.
Price, Erik wrote:
-----Original Message----- From: Kevin D. Clark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 04, 2002 5:31 PM To: Charles Farinella Cc: [EMAIL PROTECTED] Subject: Re: convert large number of graphics[...]
for A in `find /yourdir \( -name \*.bmp -o -name \*.BMP \) -print` ; do
bmptoppm $A | ppmtojpeg >`echo $A | sed 's/\.bmp/.jpg/i'`
done
Just out of curiosity, is the only difference between using "find" and "ls -R" (in this particular case) that you can use more than one glob argument? Erik _______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
_______________________________________________ gnhlug-discuss mailing list [EMAIL PROTECTED] http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
