Actions
Wiki »
Editing File Metadata¶
Many file formats support storing metadata in a dedicated header section. This can be enriched or altered.
Tools:- ExifTool: https://exiftool.org How ToHow To
Change value of a tag¶
- List of tags exiftool supports: https://exiftool.org/TagNames/index.html
For example change the value of the EXIF tag 'Artist'. With Windows cmd line.
- open cmd line (press Windows+R, type cmd and press enter)
- in cmd line navigate to folder containing exiftool executable
- to find the name of the tag you want to change, firs list metadata with actual tag names (use -s flag)
exiftool -s ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif
This givesExifToolVersion : 11.86 FileName : 042_OeNB_1904-1a.tif Directory : ../../../Documents/tmpStuff/bieber_PC_OeNB FileSize : 10 MB FileModifyDate : 2019:07:18 13:33:42+02:00 FileAccessDate : 2020:02:13 10:41:31+01:00 FileCreateDate : 2020:02:13 10:41:31+01:00 FilePermissions : rw-rw-rw- FileType : TIFF FileTypeExtension : tif MIMEType : image/tiff ExifByteOrder : Little-endian (Intel, II) SubfileType : Full-resolution image ImageWidth : 2263 ImageHeight : 1515 BitsPerSample : 8 8 8 Compression : Uncompressed PhotometricInterpretation : RGB Model : Microbox GmbH - Book2Net StripOffsets : 272596 SamplesPerPixel : 3 RowsPerStrip : 4294967295 StripByteCounts : 10285335 XResolution : 400 YResolution : 400 ResolutionUnit : inches Software : High Performance Image Library, (c) Michael Girke 2008 ModifyDate : 2016:08:29 15:44:31 Artist : Ísterreichische Nationalbilbiothek, Wien ProfileCMMType : Apple Computer Inc. ProfileVersion : 2.4.0 ProfileClass : Input Device Profile ColorSpaceData : RGB ProfileConnectionSpace : Lab ProfileDateTime : 2010:05:28 10:51:13 ProfileFileSignature : acsp PrimaryPlatform : Microsoft Corporation CMMFlags : Not Embedded, Independent DeviceManufacturer : DeviceModel : DeviceAttributes : Reflective, Glossy, Positive, Color RenderingIntent : Perceptual ConnectionSpaceIlluminant : 0.9642 1 0.82491 ProfileCreator : Unknown (LOGO) ProfileID : 0 ProfileCopyright : Copyright by LOGO GmbH, Steinfurt ChromaticAdaptation : 1 0 0 0 1 0 0 0 1 RedMatrixColumn : 0.38354 0.14978 0 GreenMatrixColumn : 0.57959 0.83546 0.01984 BlueMatrixColumn : 0.00107 0.01474 0.80507 MediaWhitePoint : 0.9642 1 0.82491 MediaBlackPoint : 0 0 0 RedTRC : (Binary data 1034 bytes, use -b option to extract) GreenTRC : (Binary data 1034 bytes, use -b option to extract) BlueTRC : (Binary data 1034 bytes, use -b option to extract) AToB0 : (Binary data 221806 bytes, use -b option to extract) AToB2 : (Binary data 221806 bytes, use -b option to extract) AToB1 : (Binary data 221806 bytes, use -b option to extract) ProfileDescription : 1910044_28-05-2010_1 ImageSize : 2263x1515 Megapixels : 3.4
- To change value of 'Artist' type: (see https://exiftool.org/#writing for details)
exiftool -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif
- Now check the result
exiftool -s ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif
This gives... Artist : Oesterreichische Nationalbibliothek, Wien ...
- Done!
- For applying this on all files in one folder:
exiftool -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB
- For applying this on all files in one folder with subfolders:
exiftool -r -Artist="Oesterreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB
Note¶
UTF-8 does not seem to work properly (although it might only be the case for EXIF tags).- Workflow for testing can be found here: https://exiftool.org/forum/index.php?topic=5011.0
- In Windows cmd
- change codepage to utf-8
chcp 65001
- then execute steps as above but with -charset utf8
exiftool -charset utf8 -Artist="Österreichische Nationalbibliothek, Wien" ..\..\..\Documents\tmpStuff\bieber_PC_OeNB\042_OeNB_1904-1a.tif
- change codepage to utf-8
Updated by Martina Trognitz almost 5 years ago · 5 revisions