how to change date created

Started by Smokeyone, February 25, 2018, 01:05:29 AM

Previous topic - Next topic

Smokeyone

Hello
I have been working my way through scores of image folders in Lubuntu deleting duplicates etc and renaming all my images by their date created which also seems to be called general date and time using this command -

exiftool -ext jpg   "-FileName<DateTimeOriginal" -d "%Y%m%d.%H.%M.%S.%%le" 100

Where 100 or 101 etc etc is the folder name - all seems fine except for one folder so far where the date seems about six months out - November 2005 rather than May 2006 - cannot understand how this happened - assume the camera time was out - however checking image properties shows
general date is six months out while modified date appears to be correct..

Hoping someone can assist please with the correct command to change the general date - I have been trying these commands as a test example but no luck so far

exiftool.exe "-DateTimeOriginal -=0:1:0 0:0:0" 100

exiftool -ext jpg   "-FileName<DateTimeOriginal" -=0:1:0 0:0:0 100

Thanks

Just checked a sample image with the command exiftool 100.jpg where 100 is the image name and although exiftool -ext jpg   "-FileName<DateTimeOriginal" -d "%Y%m%d.%H.%M.%S.%%le" 100 titles the image with a 20051126.06.47.42.jpg  the image information shows
File Modification Date/Time     : 2018:02:24 14:22:01+00:00
File Access Date/Time           : 2018:02:25 11:44:30+00:00
File Inode Change Date/Time     : 2018:02:25 11:44:30+00:00
Modify Date                     : 2010:07:09 15:25:57
Date/Time Original              : 2010:07:09 15:25:57
Create Date                     : 2010:07:09 15:25:57
Internal Serial Number          : (F06) 2005:02:25 no. 0431

Phil Harvey

Run this command on your file:

exiftool -a -G1 -s -time:all FILE

- 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 ($).

Smokeyone

Thank you Phil for the help - I just did a handful of images to keep the list short -

======== 100/20051126.08:28:15.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:30+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:28:15
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:28:15
[ExifIFD]       CreateDate                      : 2005:11:26 08:28:15
======== 100/20051126.08:27:50.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:28+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:27:50
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:27:50
[ExifIFD]       CreateDate                      : 2005:11:26 08:27:50
======== 100/20051126.08:28:05.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:28+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:28:05
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:28:05
[ExifIFD]       CreateDate                      : 2005:11:26 08:28:05
======== 100/20051126.08:32:32.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:36+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:32:32
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:32:32
[ExifIFD]       CreateDate                      : 2005:11:26 08:32:32
======== 100/20051126.08:31:04.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:34+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:31:04
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:31:04
[ExifIFD]       CreateDate                      : 2005:11:26 08:31:04
======== 100/20051126.08:27:02.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:26+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:27:02
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:27:02
[ExifIFD]       CreateDate                      : 2005:11:26 08:27:02
======== 100/20051126.08:33:23.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:40+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:33:23
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:33:23
[ExifIFD]       CreateDate                      : 2005:11:26 08:33:23
======== 100/20051126.08:30:37.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:32+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:30:37
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:30:37
[ExifIFD]       CreateDate                      : 2005:11:26 08:30:37
======== 100/20051126.08:32:48.jpg
[System]        FileModifyDate                  : 2006:05:30 06:37:38+01:00
[System]        FileAccessDate                  : 2018:02:25 14:11:07+00:00
[System]        FileInodeChangeDate             : 2018:02:25 14:11:07+00:00
[IFD0]          ModifyDate                      : 2005:11:26 08:32:48
[ExifIFD]       DateTimeOriginal                : 2005:11:26 08:32:48
[ExifIFD]       CreateDate                      : 2005:11:26 08:32:48
    1 directories scanned
    9 image files read


Phil Harvey

Thanks.

Your files only contain the standard EXIF date/time tags (the AllDates Shortcut tag), so changing these will be easy.  Run a command like this on the folder with the files having an incorrect date:

exiftool "-alldates+=1:6:0 0:0:0" DIR

This will add one year and 6 months to DateTimeOriginal, CreateDate and ModifyDate.  You'll have to decide the exact time that you want to add.

Then after that you can set the file names from DateTimeOriginal.

- 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 ($).

Smokeyone

Success and many thanks for your help. I notice that the command makes a back up original image in the folder .....

StarGeek

Add -overwrite_original to suppress the creation of backup files.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Smokeyone

Thank you for your help once again.