Question about copying data from XMP Sidecar to NEF

Started by Archive, May 12, 2010, 08:54:42 AM

Previous topic - Next topic

Archive

[Originally posted by tiago on 2009-11-21 03:56:03-08]

Hi,

I have searched the forums and they helped a lot, i came up a command line that works almost perfect for my needs.  However there is a small problem, it only works if there is a sidecar file for every NEF file.   I would like to only process for the files that have a sidecar XMP file.  is there something I can change to make it work?

exiftool -tagsfromfile %d%f.xmp -r -m -overwrite_original -ext NEF  inputFolder

I know that I could do the following:

exiftool -tagsfromfile DSC_0547.xmp  -m -overwrite_original DSC_0547.NEF

I am not very good with Applescript, so to script it wouldnt be that easy for me.  So I was hoping there is a parameter I missed that would make it work.  I cant find it?

Thx in advance

Tiago

Archive

[Originally posted by exiftool on 2009-11-21 11:37:31-08]

Hi Tiago,

I don't quite understand.  The first command you gave should process
only the NEF files that have XMP sidecars as I sounds like you wanted:

Code:
> ls tmp
a.nef   a.xmp   b.nef

> exiftool -tagsfromfile %d%f.xmp -r -m -overwrite_original -ext NEF tmp
Error: Error opening file - tmp/b.xmp
    1 directories scanned
    1 image files updated
    1 files weren't updated due to errors

So in my case, only 1 file (a.nef) was updated.  Isn't that what
you wanted?

-Phil

Archive

[Originally posted by tiago on 2009-11-21 15:45:27-08]

Yes Phil that is what I wanted.  The problem is it throws the error, so that i why I was asking if maybe there was something wrong with my command.  I had understood as you said that this command would process only the pairs (XMP and NEF), but then I get that error.  So I thought to myself maybe I got the command wrong, that it was listing the NEF files then looking for its respective XMP file.

The problem is the error makes it harder to automate using automator (or makes it harder for me), since my flow still has steps after the execution of the command.  I for example then delete the sidecar files.

BTW this tool is awesome, thx so much.  I wish I had learned Perl a long time ago Sad  There are so many things I could automate on my photography flow if knew perl using exiftool Smiley

Thx in advance,

Tiago

Archive

[Originally posted by exiftool on 2009-11-21 16:38:58-08]

Hi Tiago,

ExifTool will always issue a warning like this to indicate
that a file was not processed if there are missing XMP files.
If you are running in a Unix 'sh' shell, you could pipe the
warnings to /dev/null by adding '2>/dev/null' to the end
of the command if it is these that are causing you the problems.

- Phil

Archive

[Originally posted by tiago on 2009-11-22 03:08:03-08]

Thx Phil...

I didnt want to pipe the errors because I might miss a real error... also using applescript, but I will figure out how to ignore it...

thx again for ExifTool....

Tiago