本帖最后由 hfg1977 于 2011-4-5 08:46 编辑
- @echo off
- set "nconvert=g:\DOS\command\第三方命令行程序\nconvert.exe"
- set "ext=*.jpg *.bmp"
- if "%~1"=="" (set/p "Path_str=input you path:") else (set "Path_str=%~1")
- if not exist "%Path_str%.\" (echo path error&goto:eof)
- pushd "%Path_str%.\"
- for /f "tokens=* delims=" %%i in ('dir /a-d/b/s %ext%') do (
- for /f "tokens=1,2 delims=: " %%a in ('%nconvert% -info "%%i"^|findstr /i "Width Height"') do (
- if /i "%%a"=="Width" (if %%a LEQ 100 del /f/q "%%~dpi")
- rem if /i "%%a"=="Height" set "pciH=%%b"
- ))
复制代码
|