回复 7# tcasdsss
你的代码中有一个全角括号- @echo off & setlocal enabledelayedexpansion
- set /a Width=0, Height=0
- for /f "delims=" %%a in ('dir /b /s /a-d *.jpg *.png *.bmp') do (
- for /f "tokens=1,3" %%i in ('nconvert.exe -info "%%a" ^| findstr "Width Height"') do (
- if %%j gtr !%%i! set "%%i=%%j"
- )
- )
-
- set Width
- set Height
- pause
复制代码
|