cwebp <input_file>.jpg -o <output_file>.webp
*.jpg files, whose names are
IMG_20160227_110640.jpg or so, are stored under a directory called
root. The problem is that
*.webp files does not exist when the conversion is performed, so I don't know how to pass their names to
cwebp. For example, if I only have one picture to convert, I would simple execute
cwebp IMG_20160227_110640.jpg -o IMG_20160227_110640.webp
However, there are hundreds of them, and I don't want to type hundreds lines of command. How to use a regular expression / write a script to automate the conversion?