Create One thumbnail for every image sequence in all folders

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
dannneman
Posts: 1
Joined: 2012-03-26T08:11:16-07:00
Authentication code: 8675308

Create One thumbnail for every image sequence in all folders

Post by dannneman »

Hello,

I'm trying to get a batch file to create one thumbnail for every image sequence that exists in every sub-folder for J:\job\gladiator\

For example, for these three folders it would create 3 thumbnails (what file it selects does not matter, could be competely random):
J:\job\gladiator\vfx\040\src\plates\scene216[0001-0100].dpx (ie. there is a image sequence with 100 images in this folder)
J:\job\gladiator\blood\050\src\plates\scene219[0001-0300].dpx (ie. there is a image sequence with 300 images in this folder)
J:\job\gladiator\paint\080\src\plates\scene385[0001-0230].dpx (ie. there is a image sequence with 230 images in this folder)

This is what I have so far (I only need to figure out how I get it Goto next folder when it's done with one thumbnail for the image sequence, at the moment it creates thumbnails for every image in the image sequence).
for /R %%f in (*.dpx) do ( convert "%%f" -resize 115x116 "%%~nf.jpg" )

This would be extremely useful for me when I create databases with thumbnails, sometimes there can be up to 600 image sequences and creating thumbnails for all of them via Photoshop takes forever.

Thanks
Best Regards

Daniel
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Create One thumbnail for every image sequence in all fol

Post by fmw42 »

You could process each directory separately in a loop (after getting the list of directories you want to process) using mogrify.

see
http://www.imagemagick.org/Usage/basics/#mogrify

Unfortunately, mogrify does not traverse directories, so you have to make a list of the ones you want the process via a loop.

In unix, there are other ways, but you seem to be on windows.
Post Reply