Store tag information from file

Started by mschiff, January 19, 2017, 03:05:46 PM

Previous topic - Next topic

mschiff

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>
"


StarGeek

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.

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

mschiff

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

mschiff

#3
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

Phil Harvey

ExifTool does not generate "-be" files unless somehow you told it to by assigning the FileName tag or using the -o option.

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