0

I have a bunch of images with different create dates. I want to normalize them all to a given date (say today's date) using a batch file (Windows). Can ExifTool set dates? I only see documentation and examples for shifting dates. To shift the date to present, I would need to somehow read the date for each file, calculate the difference, and then shift. That would be ok, but I don't know how to read the create date into a variable using ExifTool.

One obstacle for me is that I don't speak Perl. I do Python, and there is pyexiv2. This allows to write the "date", but I can't see anywhere if that is just create date or all dates.

Edit

Here shows using, for example,

exiftool -AllDates='2010:08:08 15:35:33' -overwrite_original IMG_01.jpg

in Ubuntu linux, but I could not get that to work in Windows.

As a hack, I tried

exiftool -AllDates+=2015:03:02 IMG_8220.JPG

which set the dates to the time executed, probably because the shift was so completely crazy. But I'd like to have control, and, specifically be able to change YYYY:MM:DD without changing the time.

Consequently, help still appreciated.

abalter
  • 9,663
  • 17
  • 90
  • 145

1 Answers1

2

I crossposted to the ExifTool forum, and ExifTool author Phil Harvey responded that you need to use double quotes. The single quotes from the linked blog post don't do it in Windows.

So, one would use

exiftool -AllDates="2010:08:08 15:35:33" IMG_01.jpg

I tested it and (of course) it worked.

abalter
  • 9,663
  • 17
  • 90
  • 145