Skip to content

Instantly share code, notes, and snippets.

View mattrefghi's full-sized avatar

Matt Refghi mattrefghi

View GitHub Profile
@mattrefghi
mattrefghi / cwebp-all-files-in-folder.bat
Created December 8, 2023 20:47
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.
@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 off
rem Where you'd like to store the backups.
set path_backup="D:\Backups\SVN"
rem Where the working copy is held - whether it has been committed or not.
set path_working_copy="C:\Program Files\Apache Group\Apache2\htdocs\myproject"
rem Example: C:/svn/data/repositories/reponamehere
set path_to_repository="C:\svn\data\repositories\myrepo"