@echo off
:: Ask user for quality
set /p QUALITY=Enter desired quality (0-100): 

:: Create output folder
mkdir webp_output 2>nul

:: Loop through image files
for %%f in (*.jpg *.jpeg *.png *.bmp *.webp) do (
    echo Converting: %%f
    cwebp -q %QUALITY% "%%f" -o "webp_output/%%~nf.webp"
)

echo Done! All images are saved in the "webp_output" folder.
pause
