How do I extract the thumbnails from all the pictures in a directory?

Started by babaganoosh, May 20, 2013, 01:55:18 PM

Previous topic - Next topic

babaganoosh

In Windows, is there a command line to extract all the thumbnails from all the pictures in a directory?

I tried

exiftool -b -thumbnailimage *.jpg > d:\thumbpictures\*.jpg

but get permission errors or a single large file if I use:

exiftool -b -thumbnailimage *.jpg > d:\thumbpictures

thanks!

babaganoosh

OK, I did this batch file:

for /f "delims=" %%a in ('dir/b *.jpg') do (
exiftool.exe -b -thumbnailimage "%%a"          >              "d:\eee\%%a")
pause


Where d:\eee is the path where the thumbnails wind up.

I kinda know a little of batch scripting, but when I look at these command lines, I get  a 1 in front of the >.  Anyone know why?  It works anyway, more just curiosity.


Phil Harvey

This can be done with the -w option:

exiftool -thumbnailimage -b -w _thumb.jpg DIR

where DIR is one or more file and/or directory names.

This creates thumbnails with file names like "FILE_thumb.jpg".

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Alan Clifford

1> redirects STDOUT in unix-like systems.  Probably the same for ms-dos.