ExifTool Forum

ExifTool => Newbies => Topic started by: andy95 on January 19, 2020, 09:19:03 AM

Title: Transfer from one pdf file to another pdf file "Createdate" value(s)
Post by: andy95 on January 19, 2020, 09:19:03 AM
Hello.

I have two same pdf files with different -XMP-xmp:Createdate value(s).

exiftool -XMP-xmp:Createdate "test1.pdf" "test2.pdf"

How can I transfer the "-XMP-xmp:Createdate" from test1.pdf to test2.pdf (with overwriting)?

==================================

OK. I found it:

exiftool -ext pdf -overwrite_original -tagsFromFile "test1.pdf" -XMP-xmp:Createdate>-XMP-xmp:Createdate "test2.pdf"


Title: Re: Transfer from one pdf file to another pdf file "Createdate" value(s)
Post by: StarGeek on January 19, 2020, 11:08:15 AM
Quote from: andy95 on January 19, 2020, 09:19:03 AM
exiftool -ext pdf -overwrite_original -tagsFromFile "test1.pdf" -XMP-xmp:Createdate>-XMP-xmp:Createdate "test2.pdf"

Close.  You don't need the redirect, just need to name the tag you want copied.
exiftool -ext pdf -overwrite_original -tagsFromFile "test1.pdf" -XMP-xmp:Createdate "test2.pdf"

Also, for future reference, you need quotes around any part of the command that has a less/greater than sign and you don't include the dash in the second part (e.g. "-XMP-xmp:Createdate>XMP-xmp:Createdate").
Title: Re: Transfer from one pdf file to another pdf file "Createdate" value(s)
Post by: andy95 on January 19, 2020, 12:01:23 PM
Thanks again "StarGeek" for the information.
Exiftool is a very nice tool.
Regards.