是这样不?
需要第三方nconvert.exe(http://bcn.bathome.net/s/tool/index.html?key=nconvert)
放到1楼所说"同一个文档目录下"运行
运行后会生成以___crop_done_开头的新文件
仅处理jpg或jpeg文件,宽高上限99999- @echo off&pause&chcp 936
-
- for /r %%a in (*.jp*g) do (
- set f=%%a
- set ff=%%~na
- call :aaa
- )
-
- pause&exit/b
-
- :aaa
- if "%ff:~0,13%" neq "___crop_done_" (
- for %%z in ("%f%") do (
- nconvert -overwrite -crop 0 100 99999 99999 -rotate 180 -crop 0 100 99999 99999 -rotate 180 -out jpeg -q 85 -opthuff -o "%%~dpz___crop_done_%%~nz%%~xz" "%%~z"
- echo,)
- )
-
- goto :eof
复制代码
|