Main Menu

Batch processing

Started by 83years, March 28, 2014, 08:31:58 AM

Previous topic - Next topic

83years

Hi everyone,

I'm very new to ExifTool but I know exactly what I need and I can do it for 1 image at a time, I am just clueless about how to do it for the 13,000 images I have.

Each image was exported by Aperture 3 as a .JPG .TIF or .PSD with an additional .XMP sidecar file of the same name

I can use the line:

exiftool -tagsfromfile IMAGENAME.xmp -all:all IMAGENAME.jpg (or .tif .psd)

and it adds all the missing data into the .jpg file which can be read by Lightroom.

I think exiftool -tagsfromfile .xpm -o %d%f.JPG DIR should work as a batch command, but it doesn't.

Can anyone tell me why it's not working and maybe give me some pointers as to how to get it to work?

Many thanks  :D

Lucas

Phil Harvey

Hi Lucas,

It is done like this:

exiftool -tagsfromfile %d%f.xmp -all:all DIR

- 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 ($).

83years

It turns out that Phil has already answered this problem....

exiftool -tagsfromfile %d%f.xmp -all:all -r -ext jpg DIR

I found it further down in the forum but couldn't see it with google

Thanks  ;D

professor_deb

I'm attempting to do the same thing on Mac OS X with batches of JPGs and XMP files generated from software on an iPad (due to limitations on the iPad it will be much easier to tag the files on the iPad using Photogene or Photosmith and then just transfer the small XMP files to be linked back up with the original JPGs from an SD card).

ExifTool does seem to do the job with the command "-tagsfromfile %d%f.xmp -all:all -r -ext jpg DIR"

The strange thing is that the files named "_original" are in fact the altered files, not the actual originals!
Is there something I'm doing wrong? I see that there is a command "-delete_original" but this would actually delete the files that have been modified!

Ultimately I'd like to set up an Automator script or .command file to read the XMP data into the associated JPGs, rename the JPGs using a tag in the XMP file, then delete any duplicate images created by ExifTool in the process.

Thanks very much!

Deborah

professor_deb

Okay, I think I finally figured out that I need to add the argument "-overwrite_original_in_place" and it seems to write to the original files in the way that I want.

Now I would like to rename the file based on the "Headline" tag. I've been searching and searching through the forums and documentation and nothing seems to work. I'm sure it's just a syntax error.

The command "exiftool -filename<IPTC:headline *.jpg" returns the error "No such file or directory."

I'm sure it's something simple but I'm totally at a loss.

Thanks,

Deborah


Phil Harvey

Hi Deborah,

You need quotes around the argument containing "<".  Also, you may want to keep the original file extension (%e"), and I recommend using -ext jpg instead of *.jpg.

exiftool '-filename<$IPTC:headline.%e' -ext 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 ($).

professor_deb

Thanks. Unfortunately still doesn't work.

I entered exiftool '-filename<$IPTC:headline.%e' -ext jpg /Users/Home/Documents/Dropbox/Apps/Photosmith

Terminal returned:    Warning: [minor] Tag 'IPTC:headline' not defined - /Users/Home/Documents/Dropbox/Apps/Photosmith/IMG_8202.jpg
Followed by:    Warning: No writable tags set from /Users/Home/Documents/Dropbox/Apps/Photosmith/IMG_8202.jpg

The images do have the IPTC Headline tag entered, which was from the earlier -tagsfromfile operation. Very confusing!

Thanks

professor_deb

Okay, finally after several hours this seems to work:

exiftool '-filename<$headline.%e' -ext jpg .

If I put in $IPTC:headline it will not work. I have to leave off the IPTC.

It also appears I can string the two commands together into: -tagsfromfile %d%f.xmp -all:all -ext jpg . -overwrite_original_in_place '-filename<$headline.%e' -ext jpg .
It will then read the XMP data into the file and then rename the file based on the IPTC tag...that's pretty amazing!

Thanks!

Phil Harvey

Hi Deborah,

What version of ExifTool are you using?  This should work for any version less than a few years old.

And yes, you can perform any number of operations in one command.

- 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 ($).