Special feature: -csv+=CSVFILE

Started by _rach_, July 03, 2019, 11:41:56 AM

Previous topic - Next topic

_rach_

Hello everyone,

first thanks you for this exelent tools, i learn on it each days but this time i dont understand how to add -TAG to a CSVFILE without overwrite it.

i ve try this :

exiftool -keywords -csv /mydirectory/ > myfile.csv  it works well!

now when i try:

exiftool -IPTC:Caption-Abstract -ext jpg /mydirectory/ -csv+=/mycsvdirectory/myfile.csv

QuoteIgnored superfluous tag name or invalid option: -IPTC:Caption-Abstract
    1 directories scanned
   30 image files updated

i ve tried a lot of combinaison but i dont find the right thing.

thank you  :)



StarGeek

A CSV file cannot be updated with new information by exiftool. 

A workaround would be to create a new csv file with the info you wish to add and then merge it either through a spreadsheet program like Excel or OpenOffice Calc, or something like CSVKit on the command line.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

_rach_

Quote from: StarGeek on July 03, 2019, 12:12:57 PM
A CSV file cannot be updated with new information by exiftool. 

A workaround would be to create a new csv file with the info you wish to add and then merge it either through a spreadsheet program like Excel or OpenOffice Calc, or something like CSVKit on the command line.

Ooooh ok :/

thanks for the quick reply!

_rach_

then you mean that we can do :

exiftool [option] -csv+=CSVFILE  /mydirectory/CSVFILE2

?

StarGeek

That command will update all the files in  /mydirectory/CSVFILE2 that have a corresponding entry in CSVFILE with the metadata in CSVFILE.  In other words, it will import data from the csv file to the image files.  The use of += will is a special case for list type tags in the image files, such as keywords.  For example, if IMG_001.jpg has keywords John, Jane, and Alex, and the CSV file has Laura under keywords, then -csv+=CSVFILE means that Laura will be added to the keywords, resulting in John, Jane, Alex, and Laura, whereas -csv=CSVFILE means that the previous keywords would be overwritten and Laura would be the only keyword in the file.

If you need to add new data to a CSV file, you need to either run a command to create a new CSV file or edit the old one by hand.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

_rach_

Thanks for this explain.

So,I ve find what i need  :P:

exiftool -tagsfromfile %d%f.jpg '-DestTAG<SrcTAG' /mydirectory/

that copy each tag from file to file with the same sourcefile.