ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: mschiff on January 19, 2017, 03:05:46 PM

Title: Store tag information from file
Post by: mschiff on January 19, 2017, 03:05:46 PM
What am I doing wrong here? I get this error: "Error: Unknown file type - exifcomment.txt"

exiftool -tagsFromFile exifcomment.txt jpgname.jpg

Contents of exifcomment.txt

UserComment="
<Photodex Data>
<DATE> 03-14-2015

<PEOPLE>
| Humberto Campins
| Tom F Childers
| Elaina Fessler
| Diane Masterton

<CATEGORIES>
| Alpine Lake Dam

<Photodex ID Codes>
524981NPXU 962571MIJL 960521G2WK 218300FGYU 1000000206 1000000352

</Photodex Data>
"

Title: Re: Store tag information from file
Post by: StarGeek on January 19, 2017, 05:38:24 PM
Exiftool can't read tags from a text file like that.  You'll have to try something else.

One option would be to remove the UserComment=" line and the quote at the end.  You could then copy the entire text directly into the Usercomment tag like this:
exiftool "-UserComment<=exifcomment.txt" jpgname.jpg

Another option would be to create a CSV file.  This is especially good if all you data is in a spreadsheet to begin with.

Title: Re: Store tag information from file
Post by: mschiff on January 20, 2017, 10:33:34 AM
Thanks once again StarGeek. That worked. Now I have a different problem. My images are already backed up, so I don't want any files to be saved other than the original file.

I did this:

exiftool -overwrite_original "-UserComment<=exifcommentfile.txt" jpgname.jpg

and that does eliminate the "_original" file from being saved, but another file like this: jpgname-be.jpg is still left in the folder. What is this, and how can I eliminate it from being written?

TIA.

-- Martin
Title: Re: Store tag information from file
Post by: mschiff on January 20, 2017, 10:43:45 AM
Never mind. It appears that the "-be" files are only generated when an "_original" file already exists. When the folder is clean with only the JPG files, it does not leave any additional files.

-- Martin
Title: Re: Store tag information from file
Post by: Phil Harvey on January 20, 2017, 11:51:22 AM
ExifTool does not generate "-be" files unless somehow you told it to by assigning the FileName tag or using the -o option.

- Phil