Author Topic: Year Change  (Read 170 times)

firedragon

  • Newbie
  • *
  • Posts: 2
Year Change
« on: April 08, 2019, 06:30:11 AM »
Hi, I am a complete newbie.

I have a 3 months worth of "NEF" Nikon raw files where the month, day and time are correct but the year is wrong. They have 2015 rather than 2016.
So I want to date shift these forward by one year only. Not changing month, day or time.

I have saved exiftool.exe to a folder called exiftool on the root of C:
I have a folder in exiftool called CHANGE where I have put a sample file to do a test.
The sample file has Date taken: 26/06/2015 15:57. So I want to change this to: 26/06/2016 15:57

I have gone to a command window and run the following:
C:\exiftool> exiftool "-DateTimeOriginal+=1:0:0" CHANGE
I have also tried:
C:\exiftool> exiftool "-DateTimeOriginal+=1::" CHANGE
Reading the instructions provided I believe this should work.

I receive a response:
"1 directories scanned
1 image files updated"
So it looks like this has worked. However, when I look at file properties in windows the date taken still shows 26/06/2015 15:57

Can anybody tell me what I have done wrong?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14748
    • ExifTool Home Page
Re: Year Change
« Reply #1 on: April 08, 2019, 07:02:12 AM »
What you have done should change the hour.  To increment the year, do this:

exiftool "-datetimeoriginal+=1:: 0" DIR

According to this post by StarGeek, the Windows Date Taken for JPEG files should come from DateTimeOriginal, so this should work.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1049
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: Year Change
« Reply #2 on: April 08, 2019, 07:04:50 AM »
The command you used only updates one of the possible date fields in the file, it also would have shifted the time by just one hour, not by a year.

To fix the year of the three common fields used for the (creation) date time of an image, use the -alldates shortcut e.g. like so:
Code: [Select]
exiftool -alldates+="1:0:0 0:0:0" -ext NEF .This command will update all NEF files in the current directory.

The -alldates shortcut specifies DateTimeOriginal, CreateDate, and ModifyDate, these three fields, may not cover all relevant date fields in this case though, so perhaps you need to add some more (note: all date/time fields can be shifted like above).

To find out what date fields you might need/want to change as well, run exiftool on a file and go through the output to see which additional fields need changing (add the -s option to the exiftool command to list the field (=tag) names instead of a description). To restrict the output of exiftool to fields that have a dat/time in them, you can make use of wildcards in the tagnames you specify. E.g.
Code: [Select]
exiftool -s "-Time:*" -ext NEF .will show you all fields in the NEF file(s) that are in exiftool's “time” group. Alternatively you can also use e.g.
Code: [Select]
exiftool -s "-*date*" -ext NEF .to get all fields with “date” in the tag name.

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

firedragon

  • Newbie
  • *
  • Posts: 2
Re: Year Change
« Reply #3 on: April 09, 2019, 10:15:49 AM »
Thank you to you both.
I have tried the suggestions and the following did what I needed:
exiftool -alldates+="1:0:0 0:0:0" -ext NEF . CHANGE
 :)