@echo off
for /r .\待转换\ %%i in (*.jpg *.png) do (
if not exist ".\完成%%~pi%%~ni.webp" (
if not exist ".\完成%%~pi" MD ".\完成%%~pi"
.\libwebp-1.2.1-windows-x64\bin\cwebp.exe -quiet -m 6 "%%i" -o ".\完成%%~pi%%~ni.webp"
echo 已处理".\完成%%~pi%%~ni.webp"
)
)
pause
@echo off
set "mm=%cd%\完成\"
for /r .\待转换\ %%i in (*.jpg *.png) do (
if not exist "%mm%%%~ni" (
MD "%mm%%%~ni"
.\libwebp-1.2.1-windows-x64\bin\cwebp.exe -quiet -m 6 "%%i" -o "%mm%%%~ni"
echo 已处理"%mm%%%~ni"
)
)
pause