Change File Creation Date of Photos

Started by Domer, July 04, 2019, 12:57:33 PM

Previous topic - Next topic

Domer

I'm new to Exiftool, so apologies if this is a newbie question.  I'm trying to change the File Creation Date on a bunch of JPG files by setting it to the Create Date.  I've read a number of thread in this forum on how to do that and followed the directions, but it's not working.  I've pasted the console commands and output below.  Note that the command output indicates the file was updated but when I examine the date/time stamps, the FileCreateDate and FileModifyDate were not changed.  What am I doing wrong?

D:\>exiftool "-FileCreateDate<DateTimeOriginal" "-FileModifyDate<DateTimeOriginal" "-overwrite_original" IMG_0021-1.JPG
    1 image files updated

D:\>exiftool -time:all -a -G0:1 -s IMG_0029-1.JPG
[File:System]   FileModifyDate                  : 2019:07:03 16:34:59-07:00
[File:System]   FileAccessDate                  : 2019:07:03 16:36:19-07:00
[File:System]   FileCreateDate                  : 2019:07:03 16:36:19-07:00
[EXIF:IFD0]     ModifyDate                      : 2019:07:02 17:34:20
[EXIF:ExifIFD]  DateTimeOriginal                : 2019:06:29 10:11:07
[EXIF:ExifIFD]  CreateDate                      : 2019:06:29 10:11:07
[EXIF:ExifIFD]  SubSecTimeOriginal              : 00
[EXIF:ExifIFD]  SubSecTimeDigitized             : 00
[EXIF:GPS]      GPSTimeStamp                    : 14:11:02.413
[EXIF:GPS]      GPSDateStamp                    : 2019:06:29
[IPTC]          DateCreated                     : 2019:06:29
[IPTC]          TimeCreated                     : 07:11:07
[IPTC]          DigitalCreationDate             : 2019:06:29
[IPTC]          DigitalCreationTime             : 07:11:07
[ICC_Profile:ICC-header] ProfileDateTime        : 1998:02:09 06:49:00
[XMP:XMP-photoshop] DateCreated                 : 2019:06:29 07:11:07.00
[XMP:XMP-xmp]   CreateDate                      : 2019:06:29 10:11:07.00
[XMP:XMP-xmp]   MetadataDate                    : 2019:07:02 17:34:20-07:00
[XMP:XMP-xmp]   ModifyDate                      : 2019:07:02 17:34:20-07:00
[XMP:XMP-xmpMM] HistoryWhen                     : 2019:07:02 17:34:20-07:00
[Composite]     DateTimeCreated                 : 2019:06:29 07:11:07
[Composite]     DigitalCreationDateTime         : 2019:06:29 07:11:07
[Composite]     GPSDateTime                     : 2019:06:29 14:11:02.413Z
[Composite]     SubSecCreateDate                : 2019:06:29 10:11:07.00
[Composite]     SubSecDateTimeOriginal          : 2019:06:29 10:11:07.0

StarGeek

Strange.  That command should work.  I copy/pasted the command and tested it here and it worked properly.

Just to verify, the file is on a local drive, not a network drive, a pool drive, or a drive with some other unusual setup?  The file is not read only?  What is the output when you add -v2 to the command?
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

StarGeek beat me to it, but I'll post my response anyway:

I don't understand this but I can't test this on Windows right now.  The command should work, and works for me on MacOS.  But note that the -overwrite_original should be redundant since the file isn't ever written if you are setting only system tags.

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

Domer

StarGeek - Yes, the file is on a local drive and is not read-only.  The output with -v2 added is shown below.

Phil Harvey - I figured the "-overwrite_original" option wasn't required, but I was running out of things to try so I added it just to see if it helped - it didn't.

D:\>exiftool "-FileCreateDate<DateTimeOriginal" "-FileModifyDate<DateTimeOriginal" "-v2" IMG_0021-1.JPG
======== IMG_0021-1.JPG
Setting new values from IMG_0021-1.JPG
Writing File:FileCreateDate
Writing File:FileModifyDate
    + FileCreateDate = '1561827958'
    + FileModifyDate = '1561827958'
    1 image files updated

D:\>exiftool -time:all -a -G0:1 -s IMG_0029-1.JPG
[File:System]   FileModifyDate                  : 2019:07:03 16:34:59-07:00
[File:System]   FileAccessDate                  : 2019:07:03 16:36:19-07:00
[File:System]   FileCreateDate                  : 2019:07:03 16:36:19-07:00
[EXIF:IFD0]     ModifyDate                      : 2019:07:02 17:34:20
[EXIF:ExifIFD]  DateTimeOriginal                : 2019:06:29 10:11:07
[EXIF:ExifIFD]  CreateDate                      : 2019:06:29 10:11:07
[EXIF:ExifIFD]  SubSecTimeOriginal              : 00
[EXIF:ExifIFD]  SubSecTimeDigitized             : 00
[EXIF:GPS]      GPSTimeStamp                    : 14:11:02.413
[EXIF:GPS]      GPSDateStamp                    : 2019:06:29
[IPTC]          DateCreated                     : 2019:06:29
[IPTC]          TimeCreated                     : 07:11:07
[IPTC]          DigitalCreationDate             : 2019:06:29
[IPTC]          DigitalCreationTime             : 07:11:07
[ICC_Profile:ICC-header] ProfileDateTime        : 1998:02:09 06:49:00
[XMP:XMP-photoshop] DateCreated                 : 2019:06:29 07:11:07.00
[XMP:XMP-xmp]   CreateDate                      : 2019:06:29 10:11:07.00
[XMP:XMP-xmp]   MetadataDate                    : 2019:07:02 17:34:20-07:00
[XMP:XMP-xmp]   ModifyDate                      : 2019:07:02 17:34:20-07:00
[XMP:XMP-xmpMM] HistoryWhen                     : 2019:07:02 17:34:20-07:00
[Composite]     DateTimeCreated                 : 2019:06:29 07:11:07
[Composite]     DigitalCreationDateTime         : 2019:06:29 07:11:07
[Composite]     GPSDateTime                     : 2019:06:29 14:11:02.413Z
[Composite]     SubSecCreateDate                : 2019:06:29 10:11:07.00
[Composite]     SubSecDateTimeOriginal          : 2019:06:29 10:11:07.00

D:\>

Domer

Geez, I'm such an idiot.  I just reread my post and realized that the file I was reading was not the same as the file I was modifying (IMG_0021 vs IMG_0029), so that explains it.  Thanks for responding, guys.

StarGeek

Heh, same here, I only just noticed on the second post.  And I could have sworn I double checked the name.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

scotthd

Trying to learn but very new. I am trying the same thing using the -FileCreateDate<DateTimeOriginal command. However, the results are shifting the FileCreateDate to a different date than the DateTimeOriginal.  I have tried this using -FileCreateDate<CreateDate and get the same error. 

Original file

FileModifyDate                  : 2020:06:07 23:32:59-04:00
FileAccessDate                  : 2020:06:08 13:21:33-04:00
FileCreateDate                  : 2020:06:08 13:21:33-04:00
ModifyDate                       : 1935-01-01 01:13:39
DateTimeOriginal               : 1935:01:01 01:13:39
CreateDate                        : 1935:01:01 01:13:39
DateCreated                      : 1935:01:01
DateTimeCreated                : 1935:01:01 01:13:39+00:00

Ran -FileCreateDate<DateTimeOrginal

FileModifyDate                  : 2020:06:07 23:32:59-04:00
FileAccessDate                  : 2020:06:08 13:21:33-04:00
FileCreateDate                  : 1834:12:31 01:13:39-04:00
ModifyDate                       : 1935-01-01 01:13:39
DateTimeOriginal               : 1935:01:01 01:13:39
CreateDate                       : 1935:01:01 01:13:39
DateCreated                     : 1935:01:01
DateTimeCreated               : 1935:01:01 01:13:39+00:00

I am not sure why it is shifting the FileCreateDate like that.

Any suggestions how to trouble shoot this?

-Scott



StarGeek

ExifTool uses standard Perl date/time routines to do the necessary conversions.  These routines are based on an epoch date of 1970, and the behavior before that can be funny.

It is very unlikely that you would have any digital files actually created before this time.

Previous posts on the subject
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,8704.msg44652.html#msg44652
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,8848.msg45531.html
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,9192.0.html
http://u88.n24.queensu.ca/exiftool/forum/index.php?topic=9403.0
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,7384.msg51768.html#msg51768
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype