ExifTool Forum

ExifTool => Newbies => Topic started by: ursinus on May 12, 2015, 03:34:11 PM

Title: Please help me construct a command
Post by: ursinus on May 12, 2015, 03:34:11 PM
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.
Title: Re: Please help me construct a command
Post by: ursinus on May 12, 2015, 04:28:18 PM
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/"
Title: Re: Please help me construct a command
Post by: Phil Harvey on May 12, 2015, 05:02:52 PM
Did you verify that the source file contains DateTimeOriginal?  See FAQ 3 (https://exiftool.org/faq.html#Q3) for help here.

- Phil
Title: Re: Please help me construct a command
Post by: ursinus on May 12, 2015, 05:15:15 PM
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
Title: Re: Please help me construct a command
Post by: ursinus on May 12, 2015, 05:16:26 PM
I tried

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

but no luck
Title: Re: Please help me construct a command
Post by: Phil Harvey on May 12, 2015, 05:22:20 PM
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/"
Title: Re: Please help me construct a command
Post by: ursinus on May 12, 2015, 05:23:07 PM
Great, thanks Phil