Main Menu

Exif date, questions...

Started by Yanka, September 26, 2024, 09:33:08 AM

Previous topic - Next topic

Yanka

I am new to the forum, never posted anything on a forum before.
I am busy sorting my photos into folders by year.
My renaming method is: YYYYMMDD_HHMMSS.
Tried programs, but they do not change all dates.
I have a Mac computer. I hope you can help me...

1. I have photos that do not have the correct date.
I want to reset the date of photos to the moment I pressed the button on my camera.
A file has multiple dates, they should all have the same date. How can I change that?
2. Photos that you last opened, get the date of when you last opened them.
Can you change that too?
3. How can I rename a photo file, or rename multiple photo files at once?

Greetings
from Yanka.

Phil Harvey

Hi Yanka,

The dates shouldn't change (except for FileAccessDate) if you just open the file.

This command will rename all files in a folder (DIR) based on CreateDate:

exiftool -d %Y%m%d_%H%M%S.%%e "-filename<createdate" DIR

But you should use this command on the file to see what tag to use instead of possibly CreateDate:

exiftool -time:all -s -G1 FILE

Note that System times are stored in the filesystem directory information, not in the files themselves.

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

Yanka

Thanks for your answer! Wow, the exiftool works to rename my photo!
I use the program Invisor to view exif.
In a file I read in the exif data 16 date that you can change.
Everything is on 20141225_203232. But the data of 2024 does not change.

File
- Name
- Created
- Modified
Image
- Date and Time
Exif
- Date and Time (original).  Is this the date when you press the button on the camera?
- Date and Time (digitized)
IPTC - Date created
- Time Created
XMP
- Create Date
- Metadata Date   2024-09-06T22:13:51+02:00
- Modify Date
- Date Created
- Date and Time Digitized
- Date and Time Original
XMP/xmpMM
- History[2]/stEvt:when   2024-09-06T22:13:51+02:00
XMP/kbrg
- InitialEditCaptureTime

Can I ask a strange question now?
Is there a separate exiftool code for these 16 dates?
So that I can manually change them and see if they are correct in Invisor?
I want to check my files this way and save them correctly.
I would like all files to have the same date.

I hope you understand me.
Because I have an Apple I find it difficult to search for this information.
And I have to translate everything from English to Dutch.
I don't understand much of it, but I think it's very clever to make this manually!

Greetings
from Yanka.

Phil Harvey

Hi Yanka,

Date time original is when you pressed the button on your camera.  The ExifTool tag names for all of these date/time tags are give by my last command.  You can change any of them like this: 

exiftool -TAG="2024:08:24 19:30:00" FILE

or set them all to the value of one tag for all files in a directory like this:

exiftool -wm w "-time:all<datetimeoriginal" DIR

but note that the System tags will need to be set separately.

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

Yanka

Sorry, I can't figure out this code.
I'm unable to post a screenshot here.

Greetings
from Yanka.

StarGeek

You do not need to change the MetadataDate or the history time stamps. Those are automatically updated by whatever image management program you are using, such as Lightroom or Digikam.
* 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).

Yanka

Thanks for the quick answers!
I can do the renaming well, but for my other question, I don't understand much of the answers.
I would really like to be able to change the exif in the file!
No program can do that, only rename.
For all the dates in the file, are there codes to change them separately?
I think Exiftool can help me.... I can't program, I would like to learn.

Greetings
from Yanka.

StarGeek

Phil's first post showed you how.

First, use the command to get tag names. Without that, you are only seeing tag descriptions. Tag names never have spaces in them
exiftool -time:all -s -G1 FILE

Then, once you get the tag name you want to change, use the other command, replacing the word "TAG" with the name of the actual tag you want to change.

Here's an example. In this listing, the XMP:CreateDate is way off. I also want to change the file system timestamps (except the FileAccessDate)  and the two ModifyDate tags to be the same as all the others.
C:\>exiftool -time:all -G -a -s y:\!temp\Test4.jpg
[File]          FileModifyDate                  : 2024:09:24 19:01:30-07:00
[File]          FileAccessDate                  : 2024:09:27 07:59:03-07:00
[File]          FileCreateDate                  : 2006:10:31 16:37:23-07:00
[EXIF]          ModifyDate                      : 2023:06:22 12:00:00
[EXIF]          DateTimeOriginal                : 2024:09:27 12:00:00
[EXIF]          CreateDate                      : 2024:09:27 12:00:00
[XMP]           DateTimeOriginal                : 2024:09:27 12:00:00
[XMP]           CreateDate                      : 1980:01:01 00:00:00
[XMP]           ModifyDate                      : 2023:06:22 12:00:00

C:\>exiftool -P -overwrite_original -ModifyDate="2024:09:27 12:00:00" -XMP:CreateDate="2024:09:27 12:00:00" -FileModifyDate="2024:09:27 12:00:00" -FileCreateDate="2024:09:27 12:00:00" -FileCreateDate="2024:09:27 12:00:00"  y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -time:all -G -a -s y:\!temp\Test4.jpg
[File]          FileModifyDate                  : 2024:09:27 12:00:00-07:00
[File]          FileAccessDate                  : 2024:09:27 08:01:01-07:00
[File]          FileCreateDate                  : 2024:09:27 12:00:00-07:00
[EXIF]          ModifyDate                      : 2024:09:27 12:00:00
[EXIF]          DateTimeOriginal                : 2024:09:27 12:00:00
[EXIF]          CreateDate                      : 2024:09:27 12:00:00
[XMP]           DateTimeOriginal                : 2024:09:27 12:00:00
[XMP]           CreateDate                      : 2024:09:27 12:00:00
[XMP]           ModifyDate                      : 2024:09:27 12:00:00
* 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).

Yanka

I am able to enter the exiftool well. I get to see the information of the photo, like your example. Then I see the date of 2014 and also of 2024. I would like to change this. I want all dates to be the same. I only see tag descriptions. Which exiftool should you use to replace the tag? In the example I see no tags. Tag names you can rename the file name, that works well for me. In your example I see Windows. I have Apple.

Greetings
from Yanka.

StarGeek

I'm not sure what else we can do. All the commands shown here are exactly the same for Windows, Mac, and Linux.
* 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).

Yanka

It's not quite what I expected.
That's why I don't think it's necessary to leave this post up.
Can my entire post be deleted?
And can my account be deleted too?

Phil Harvey

I've deleted your account, but StarGeek and I spent time answering your questions and it would have been a total waste of our time if I delete these posts.  Maybe someone can learn something from them.

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

Triplehelix

Hi!

Totally learned something here.  Yanka and I have very similar goals.

 
Backstory you probably don't care about:
For some reason, Windows Explorer was using the EXIF "CreateDate" to display in the DATE column.  This was confusing as my GUI program for renaming files (and their dates) successfully changes those System Dates that you were mentioning, but why Explorer defaulted to this EXIF date is a mystery (They didn't have EXIF dates in 1978).  Hence, even though I could change the system dates back to 1978 (So when they are uploaded to the cloud, they remain in chronological order of time taken), Windows Explorer prevented me from quick quality spot-checks to ensure all dates have indeed been changed (Search: *.* for the 1978 directory when my images are sorted by \month\Roll 1\ directories)

Images that were simply scanned can have their system date altered, but any images that were processed in Photoshop then get the EXIF data written to them (and cannot be changed with my current process).  For now, I digress...

My question is:
How can I change as many dates as possible for all of the files (.jpgs) in a single directory as efficiently as possible?  I figure if I'm going to go through the trouble of changing one EXIF date, I might as well pick up the rest while I'm there.  I prefer not to have to type each TAG for each time, nor for each image file (i.e. 1978-10-28-Roll 2-005), Even so, I'd be happy to change just the one date that Explorer insists on using (which I have figured out already).

Hope and dreams:
I'd love to keep a copy of some code in Notepad, edit just one time signature within the code, and then paste that code to CMD from within the directory with my files in it and have it step through all files and all dates (not Accessed, of course).

Thank you so much!  This is a pretty powerful program, with a crazy learning curve.  I appreciate all of the help.

-Johnny


Phil Harvey

Hi Johnny,

Quote from: Triplehelix on October 02, 2024, 05:37:11 AMMy question is:
How can I change as many dates as possible for all of the files (.jpgs) in a single directory as efficiently as possible?  I figure if I'm going to go through the trouble of changing one EXIF date, I might as well pick up the rest while I'm there.

This command I gave in a previous post will set all writable date/time values for all files in a directory based on whichever tag you want (DateTimeOriginal for example):

exiftool -wm w "-time:all<datetimeoriginal" DIR

or you can set them all to a value:

exiftool -wm w "-time:all=2024:10:02 07:00:00" FILE

The -wm w option causes the command to write only existing 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 ($).

StarGeek

Quote from: Triplehelix on October 02, 2024, 05:37:11 AMFor some reason, Windows Explorer was using the EXIF "CreateDate" to display in the DATE column.  This was confusing as my GUI program for renaming files (and their dates) successfully changes those System Dates that you were mentioning, but why Explorer defaulted to this EXIF date is a mystery (They didn't have EXIF dates in 1978).

They pretty much didn't have digital images back in 1978. But scanners exist, and you can set the EXIF data to the date/time when the original analog photo was taken. EXIF is the most supported metadata standard, why would Windows not use it for the "Date Taken"? What else should it use? Definitely not the file system ones because a photo taken in 1978 could not possibly exist as a digital file. From my quick search, BMAP didn't exist until 1985 and GIF was created in 1987.

See the Windows Metadata post for a list of what tags Windows reads to fill the Properties window.

Quote from: Triplehelix on October 02, 2024, 05:37:11 AMImages that were simply scanned can have their system date altered, but any images that were processed in Photoshop then get the EXIF data written to them (and cannot be changed with my current process).  For now, I digress...

What are you using to edit the file system time stamps that can't be used to edit the EXIF data? I don't have Photoshop, but Adobe Bridge allows for editing of EXIF data (but not file system data). Any command line program to do so could be replaced with exiftool, as exiftool can edit the file system time stamps.
* 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).