Sorry I have to revert back to this problem.
At first thank you for the suggestions so far.
But I am still fiddling around with the batch script.
Originally I want to use the well known free cmdline tool ImageMagic available from here (scroll down for Win release):
http://www.imagemagick.org/script/download.php
With the help of this tool I want to count the number of pictures in a (big) directory which have dimension above a certain (pixel) size.
Therefore I setup the following batch script (see bottom of this posting). I already adjusted the masked internal command as suggested here)
However when I run this batch script in the top node directory of the picture folder tree I am getting always the error:
'D:\todo\IMG v7\magick" identify -ping -format "INC' is not recognized as an internal or external command,
operable program or batch file.
The filename, directory name, or volume label syntax is incorrect.
Missing operator.
When I execute the ImageMagick command from cmdprompt (=not from batch script) for a single picture like
"D:\todo\IMG v7\magick" identify -ping -format "INC=%[fx:w>=400||h>=200?1:0]" D:\todo\dummy.jpg
then everything works.
So the error must be somehow in the batch script statement.
So do I have to mask the double percentage sign near INC as well?
Writing in batch script
^"INC=%%[fx:w>=400||h>=200?1:0]^"
let the batch script execution collapse immediately without error message
Writing in batch script:
^""INC=%%[fx:w>=400||h>=200?1:0]"^"
yields:
'D:\todo\IMG v7\magick" identify -ping -format ""INC=%[fx:w>=400||h>=200?1:0]"' is not recognized as an internal or external command,
operable program or batch file.
Missing operator.
Code: Select all
set IMG7path=D:\todo\IMG v7\
set TOTAL=0
set COUNT=0
for /R . %%F in (*.jpg) do (
for /F "usebackq" %%L in (`^"%IMG7path%magick^" identify -ping -format "INC=%%[fx:w>=400||h>=200?1:0]" %%F`) do set %%L
set /A TOTAL += 1
set /A COUNT += !INC!
)
echo TOTAL=%TOTAL%
echo COUNT=%COUNT%