Skip to content


Replace existing keyword list with two new keywords ("EXIF" and "editor").

exiftool -keywords=EXIF -keywords=editor ${FILENAME}.png

Copy a source image to a new file, and add a keyword ("word") to the current list of keywords.

exiftool -Keywords+=word -o newfile.jpg  ${FILENAME}.png

Delete Credit information from all files in a ${PATH}ectory where the Credit value was "xxx".

exiftool -credit-=xxx  ${PATH}

Write alternate language for XMP:Description, using HTML character escaping to input special characters.

exiftool -xmp:description-de='kühl' -E  ${FILENAME}.png

Delete all meta information from an image.

exiftool -all=  ${FILENAME}.png

Delete all meta information from an image and add a comment back in.

exiftool -all= -comment='lonely'  ${FILENAME}.png

Delete all meta information except JFIF group from an image.

exiftool -all= --jfif:all  ${FILENAME}.png

Delete Photoshop meta information from an image (note that the Photoshop information also includes IPTC).

exiftool -Photoshop:All=  ${FILENAME}.png

Adjust original date/time of all images in directory " ${PATH}" by subtracting one hour and 30 minutes.

exiftool -DateTimeOriginal-='0:0:0 1:30:0'  ${PATH}

Add 3 hours to the CreateDate and ModifyDate timestamps of two images.

exiftool -createdate+=3 -modifydate+=3 a.jpg b.jpg

Shift the values of DateTimeOriginal, CreateDate and ModifyDate

exiftool -AllDates+=100000:-30 -if '$make eq "Canon"'  ${PATH}

Set all dates to 2012

exiftool -AllDates="2012:03:14 12:25:00"

Create XMP Files

exiftool -o %d%f.xmp  ${PATH}

Set City

exiftool -xmp:city=Kingston i
exiftool -Megapixels -if "$Make eq 'Sony'"
exiftool -Composite:GPSPosition

Remove GPS data

exiftool -GPS*= -a

Remove ALL metadata

exiftool -ApertureValue="3.0" -EXIF:all=
exiftool -EXIF:all= -ApertureValue="3.0"

Include some Cool info

$gpsPosition = $(exiftool -s -s -s -Composite:GPSPosition TestPic.jpg)
echo "This picture was taken at $gpsPosition"

Timeshift Photos by One Year

exiftool "-AllDates+=1:0:0 0" .

Rename files to datestamp

exiftool '-FileName<DateTimeOriginal' -d "%Y-%m-%d %H.%M.%S%%-c.%%e" .  

Display all compoisites

exiftool -G -Composite:all
exiftool -Sort -G -Composite:all$ {PATH}

Rename Files to With Milliseconds

exiftool -v '-Filename<${datetimeoriginal}${subsectimeoriginal;$_.=0 x(3-length)}.%e' \
    -d %Y%m%d_%H%M%S ${PATH}

Set Date/Time Original date:

exiftool '-datetimeoriginal=2015:01:18 12:00:00' ${PATH}

Edit File Modification Date/Time to same date as "date/time original"

exiftool "-filemodifydate<datetimeoriginal"

List all dates

exiftool -time:all -a -G0:1 -s

Update any photo that doesn't have DateTimeOriginal to have it based on file modify date

exiftool '-datetimeoriginal<filemodifydate' -if '(not $datetimeoriginal or \ 
($datetimeoriginal eq "0000:00:00 00:00:00")) and ($filetype eq "JPEG")' ${PATH}

The command alone will put the full filename comments.

exiftool "-AllDates=1986:11:05 12:00:00" -if '$filetype eq "JPEG"' ${PATH}

Command alone will put the full filaname in comments verison 2

find "${PATH} -name "*.jpg" | while read filename; do
    exiftool "-AllDates=1986:11:05 12:00:00" "${FILENAME}";

Set File Modification Date/Time

exiftool "-FileModifyDate<XMP:DateTimeOriginal" \
         "-FileModifyDate<EXIF:CreateDate"       \
         "-FileModifyDate<XMP:CreateDate" \
         "-FileModifyDate<$IPTC:DateCreated $IPTC:TimeCreated" \
         "-FileModifyDate<EXIF:DateTimeOriginal" ${FILENAME}


  • Comments are closed on this article!

Last update: December 6, 2022 16:13:32