if [ -z "$1" ];then
echo "Error: please put a file path to convert"
exit 1
else
CPATH="$1"
fi
find $CPATH -type f -iname \*.bmp | while read filename; do
convert "$filename" -quality 100% "$filename".jpg && rename .bmp.jpg .jpg "$filename".jpg && rm "$filename"
done
script thanks to my Manager Lye
No comments:
Post a Comment