Page 1 of 1

Identify doesn't work when ran from a BATch or CMD file

Posted: 2016-11-21T06:22:00-07:00
by magatyb
This command when ran alone in the command console work as intended (for my picture, printed output is 640x480)
identify.exe -format "%wx%h" "C:\01.jpg"
When the command is placed in a BATch or CMD file there is no output or error.
Anyone else experiencing this? I'm on Windows 7 x64.

Re: Identify doesn't work when ran from a BATch or CMD file

Posted: 2016-11-21T06:31:42-07:00
by GeeMack
magatyb wrote:This command when ran alone in the command console work as intended (for my picture, printed output is 640x480)
identify.exe -format "%wx%h" "C:\01.jpg"
When the command is placed in a BATch or CMD file there is no output or error.
Anyone else experiencing this? I'm on Windows 7 x64.
In a Windows BAT script you need to make sure all your single percent signs "%" are doubles "%%".

Also, always provide the version of IM you're using.

Re: Identify doesn't work when ran from a BATch or CMD file

Posted: 2016-11-21T07:22:37-07:00
by magatyb
Hi. You are right. That fixed it. I am using Version: ImageMagick 7.0.0-0 Q16 x86 2016-03-06 http://www.imagemagick.org
Thank you!

Re: Identify doesn't work when ran from a BATch or CMD file

Posted: 2017-03-17T06:37:20-07:00
by kitchin
Are you sure? IM v.7 does not have identify.exe as far as I know. Maybe you have a PATH to v.6.
The new syntax is "magick -identify"