Using identify to check jpegs in *subfolders*?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
featheredtar
Posts: 7
Joined: 2012-06-11T20:00:48-07:00
Authentication code: 13

Using identify to check jpegs in *subfolders*?

Post by featheredtar »

I have a drive with hundreds of thousands of jpegs that reside in different folders and subfolders. How can I use imagemagick's identify to check each one for corruption across many subdirectories? I'm on Windows 7.

Or could someone point me in the direction of an example? I don't know how to script.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Using identify to check jpegs in *subfolders*?

Post by snibgo »

For a simple check:

Code: Select all

forfiles /M *.jpg /S /C "cmd /c identify @file"
snibgo's IM pages: im.snibgo.com
featheredtar
Posts: 7
Joined: 2012-06-11T20:00:48-07:00
Authentication code: 13

Re: Using identify to check jpegs in *subfolders*?

Post by featheredtar »

Thanks. :-D
Last edited by featheredtar on 2013-10-03T01:07:40-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Using identify to check jpegs in *subfolders*?

Post by snibgo »

If your jpeg files (*.jpg) are in Q:\ and its subdirectories:

Code: Select all

forfiles /P Q:\ /M *.jpg /S /C "cmd /c identify @path"
snibgo's IM pages: im.snibgo.com
Post Reply