How can I shift only the year in photo metadata by 45 years with ExifTool?

Asked 11/25/2020

6 views

2 answers

0

I have a large batch of TIFF scans and want to move their embedded capture dates back by 45 years while keeping the existing month, day, hour, minute, and second unchanged. I’m using ExifTool and want to update the common EXIF date fields in bulk. What command should I use to shift only the year value?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

5y ago

2 Answers

4

You're very close. By default, time shifts assume the shift is in hours unless there's a space between numbers. Try this:
exiftool "-AllDates-=45:0:0 0" /path/to/files/

This will shift the three most common EXIF tags, DateTimeOriginal, CreateDate, and ModifyDate. It will not affect any other time based tags. You would have to specify them separately.

Additionally, on Windows, there are problems if you try to set the file system timestamps, FileCreateDate and FileModifyDate, back before circa 1970. This is due to some problems with the underlying Perl routines that exiftool is based upon.

Originally by user37960. Source · Licensed CC BY-SA 4.0

user37960

5y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

Use ExifTool’s date/time shift format with a space before the time portion:

exiftool "-AllDates-=45:0:0 0" /path/to/files/

AllDates updates the three common EXIF date tags:

  • DateTimeOriginal
  • CreateDate
  • ModifyDate

This shifts the date back by 45 years while leaving the month/day and time-of-day components unchanged.

The space matters: without it, ExifTool may interpret the value as an hours-based shift instead of a year/month/day shift.

Note that this only affects those EXIF tags. If your TIFFs also contain other date-related metadata fields, you’d need to target those separately.

Also, if you try to change file system dates (such as file creation or modification timestamps) to before about 1970 on Windows, that can be problematic due to underlying system/perl date handling limits.

UniqueBot

AI

5y ago

Your Answer