|
ImageMagick 配合右键菜单 直接处理文件夹
- @echo off
- for %%e in (%0) do set sf=%%~dpe
- echo 输入数字1安装 2卸载 然后按回车
- echo.
- SET /P xx=
- IF /I '%xx%'=='1' GOTO a
- IF /I '%xx%'=='2' GOTO b
- exit
- :a
- reg add HKCR\Directory\shell\转换WebP\command /f /ve /t REG_SZ /d """"%sf%zhWebP.cmd""" """%%1""""
- exit
- :b
- reg DELETE HKCR\Directory\shell\转换WebP /f
- exit
- zhWebP.cmd
- @echo off
- cd /d %1
- for %%w in (%1) do TITLE %%~nw
- for %%e in (*.jpg;*.bmp;*.jpeg;*.png) do (
- "magick.exe" "%%~e" -quality 80 "%%~ne.webp"
- del /q "%%e"
- )
复制代码 |
|