Created
December 8, 2023 20:47
-
-
Save mattrefghi/6577a056ea4ce2f7bd2986117d09e8b9 to your computer and use it in GitHub Desktop.
This is a fairly dumb batch file that, when placed in a folder, will run Google's cwebp.exe (https://developers.google.com/speed/webp/docs/precompiled) against all .jpg files in the same folder as the script. Could be a lot smarter, but it did the trick, figured it could be a good starting point for someone else.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set /a counter=0 | |
| for %%f in (*.jpg) do ( | |
| C:\libwebp\bin\cwebp.exe -q 80 %%f -o %%~nf.webp | |
| set /A counter=counter+1 | |
| ) | |
| echo ************************************ | |
| echo %counter% files have been processed. | |
| echo ************************************ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment