write tags to csv/txt file listed by filename.jpg

Started by Chris75, April 11, 2013, 01:35:42 AM

Previous topic - Next topic

Chris75

Hello,
Is it possible to write tags of an image folder (e.g. the orientation) listed by the filenames to a csv/txt file?

Thanks & best regards,
Chris

Phil Harvey

Hi Chris,

Yes:

exiftool -csv -orientation FOLDER_NAME > out.csv

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

Chris75


Chris75

Hi Phil,

Is it possible to write tags like e.g. image direction to JPGs by filenames listed in such a csv or txt?

Thanks,
Chris




Phil Harvey

You can do this with any number of writable tags in the same command.  See the Tag Name documentation if you want to see what tags are writable (spoiler: just about any tag you can imagine).

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

Chris75

Hi Phil,

Thanks for your input on the tags which was very helpful. I couldn't find a solution anyway.
If I like to write the attributes from a csv or txt file to the JPGs exifdata and overwrite the existing values - how can I process it? I can write the same date or ascending/descending it by increment but how to transfer tags from a table?
e.g. table with attributes/tags
IMG1.jpg, GPSLatitude1, GPSLongitude1, datetimeoriginal1
IMG2.jpg, GPSLatitude2, GPSLongitude2, datetimeoriginal2
...
Can I write the datetimeoriginal tags or other attributes available to the exif data of the JPGs, not one by one but in batch proces?

This would be the other way around to the cmd "exiftool -csv -orientation FOLDER_NAME > out.csv" for the orientation tag and creating the csv from the JPGs.

Thanks & best regards,
Chris

Phil Harvey

Hi Chris,

The inverse of this command

exiftool -csv -orientation FOLDER_NAME > out.csv

is this

exiftool -csv=out.csv -orientation FOLDER_NAME

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

Chris75

Thanks again, Phil.
Would be of great help for me if it transfers the attributes from the csv table to the exif of the JPGs.

Best regards,
Chris

Phil Harvey

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