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

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
magatyb
Posts: 6
Joined: 2015-07-01T04:57:02-07:00
Authentication code: 6789

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

Post 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.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

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

Post 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.
magatyb
Posts: 6
Joined: 2015-07-01T04:57:02-07:00
Authentication code: 6789

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

Post 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!
kitchin
Posts: 7
Joined: 2011-06-26T09:04:32-07:00
Authentication code: 8675308

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

Post 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"
Post Reply