I use Midnight Commander under Win32, and I run GAWK (GNU awk) to make webp files from jpegs. I know that I have hard coded my B: ramdrive directory but this is just a hack to to convert jpegs via PBMtools to have an unsharp mask applied and change gamma to lighten the image ( via the mask ).

Actually, convert.exe from Imagemagick can do shorter work than this, but it consumes too many CPU cycles on my machine. I did this so it would run more predictably while I browse internet.

### Obviously I am escaping some literals, Octal value 174 is ascii | and octal value 076 is >
### Pipe jpeg list to input, and make the greymap that we will use on all the PNMs in the PNMconvol utility
dir/b *.jpg | gawk "BEGIN{printf\"@pamgauss 19 19 -sigma=.2 -tupletype=GRAYSCALE \174 pamtopnm \076 b:\\000\\01gauss.pgm\n\"}
### Increment a counter, and if Modulus of 16 is zero then print a line that halts the batch file for twenty seconds, then assign the filename minus the extentsion to A1
{{ idx++; if (!(idx%%16)) printf\"@powershell start-sleep 20\n\"; A1=substr($1,1,(length($1)-4));
###Print a Label for each block operation, useful if you interrupt like "goto :skip3000. Convert the jpeg to pnm, Blur the image to use as a mask and fudge Gamma 1.1
###Pammasksharpen removes this Map from the original, then Pipe it to the PNG writer pnmtopng. Cwebp is Google's utility.
printf \":skip%%04d\n\@del b:\\000\\010101.ppm\n@jpegtopnm %%s.jpg \076 b:\\000\\010101.ppm\n@pnmconvol -nooffset b:\\000\\01gauss.pgm b:\\000\\010101.ppm \174 pnmgamma 1.1 \076 b:\\000\\100000.ppm\n@pammasksharpen b:\\000\\100000.ppm b:\\000\\010101.ppm \174 pnmtopng \076 b:\\000\\00000sharp.png\n@if not exist b:\\000\\00000sharp.png goto skip%%04d\n\",idx,A1,idx+1; printf\"@cwebp -af -q %%d b:\\000\\00000sharp.png -pass 4 -o b:\\000\\%%s.webp\n\",(idx%%4)+86,A1}}" > %D\0a.bat

^Yay the end of the gAWK script. Sometimes instead of redirect to file I pipe it thru SED first, if I want to chage directory locations, or I do a notepad search and replace.
Yes I am old but since I grew up with computers at the same time Pugh was making skiplists, you can't teach an old dog new tricks. If I get anything humongous like this again I will re-post here. Comments and derision welcome.