> convert $i `basename $i bmp`jpg It's probably better to write it this way: convert "$i" "$(basename $i bmp)jpg" The $() notation is something I've only recently gotten used to. backticks don't allow you to quote your args. In scripts it is always a good idea to quote your arguments, because you never know the value of $i. Rob