Please help me construct a command

Started by ursinus, May 12, 2015, 03:34:11 PM

Previous topic - Next topic

ursinus

I would greatly appreciate help constructing this command

Copy capture date/time from files in dir a (mix of dng and cr2) to dir b (all tiff). All fliles have same/corresponding bases. cr2s have sidecars.

E.g.

Dir A

pic-001.dng
pic-002.cr2
pic-003.cr2
pic-004.dng
pic-005.cr2

Dir B

pic-001.tif
pic-002.tif
pic-003.tif
pic-004.tif
pic-005.tif

I only want the capture date/time, nothing else. Thanks alot! I cannot get syncomatic to do this in Lightroom.

ursinus

This is what I have, it's working for keywords but not for capture date and time

exiftool -tagsfromfile "C:/Users/none7878/Desktop/123/dng/%f.dng" -DateTimeOriginal -XMP:Description -ext tif "C:/Users/none7878/Desktop/123/tif/"

Phil Harvey

Did you verify that the source file contains DateTimeOriginal?  See FAQ 3 for help here.

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

ursinus

I got the above working. Can you tell me how to include both the dng and cr2 in the source dir so I can do it one fell swoop?

Thanks

ursinus

I tried

exiftool -tagsfromfile "C:/Users/none7878/Desktop/123/dng/%f.*"  ...

but no luck

Phil Harvey

You should be able to do both like this:

exiftool -tagsfromfile %-:1d/dng/%f.cr2 -datetimeoriginal -xmp:description -tagsfromfile %-:1d/dng/%f.dng -datetimeoriginal -xmp:description -ext tif "C:/Users/none7878/Desktop/123/tif/"

You will get warnings for non-existent cr2 and dng files, but I think it should work OK.

- Phil

Edit: Maybe a better solution is to key on the raw files and use the tricky -srcfile option.  Let me think about this...

OK.  this should also work (with fewer warnings, provided there is a .tif for each raw file):

exiftool -tagsfromfile @ -datetimeoriginal -xmp:description -srcfile %-:1d/tif/%f.tif -ext dng -ext cr2 "C:/Users/none7878/Desktop/123/dng/"
...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 ($).

ursinus