mass changing EXIF of jpg

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: mass changing EXIF of jpg

Post by *Gral »

Exif Tool is command line utility from https://exiftool.org/
My previous command was slightly invalid (just for example).
In your case for files with names from your example "20130320" valid command looks like:

Code: Select all

exiftool "-DateAcquired<FileName" -d "%YYYY%mm%dd.%e" *.jpg
if you want to write to "Date Acquired" from file names for all JPGs in directory.
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

Gral wrote: ↑2023-01-30, 20:07 UTC As for me the best solution would probably be as usual exiftool
I have already explained why exiftool is not the best choice.

2chiara.codagnone
I would look towards exiv2.
Copy and paste the code to your toolbar and specify the correct path:
TOTALCMD#BAR#DATA
%ComSpec% /v/q/c for /f "delims= eol=" %f in
('^<"%WL" more') do if not exist "%%f\" set "d=%%~nf" & "%%COMMANDER_PATH%%\Utils\exiv2\exiv2.exe" -M"add Xmp.MicrosoftPhoto.DateAcquired !d:~,4!-!d:~4,2!-!d:~6,2!" "%%f"
wcmicons.dll,82
Set Date Acquired to selected JPG/TIFF files from base name <yyyyMMdd>

1
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: mass changing EXIF of jpg

Post by *petermad »

2Fla$her
Fla$her wrote:2solid
Because jpg-comment doesn't have such a field/tag. I watched it even before your first answer.
if you want the jpg-comment plugin to support Xmp.MicrosoftPhoto.DateAcquired, then you have to manually add it to the jpg-comment.ini file - for example at the end as:
135=10|Xmp_MicrosoftPhoto_DateAcquired|Xmp.MicrosoftPhoto.DateAcquired

I tried it, and with that line added I can both read and write Xmp.MicrosoftPhoto.DateAcquired with the plugin.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

2petermad
Good idea, I already forgot about ini, because it was considered obsolete. We must first remove .old from jpg-comment.old.ini. The disadvantage is that in the current form, the fields will be named as in the old version, i.e. not short.

chiara.codagnone wrote: ↑2023-01-30, 20:54 UTCI still can't modify mp4
See the recent topic.
Overquoting is evil! πŸ‘Ž
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: mass changing EXIF of jpg

Post by *solid »

Fla$her wrote: ↑2023-01-30, 19:56 UTC
solid wrote: ↑2023-01-30, 19:50 UTCI don't understand, what jpg-comment?
I didn't understand the question.
solid wrote: ↑2023-01-30, 19:50 UTCbut it is the same field.
Who told you that? These are all different fields:
Exif.Photo.DateTimeOriginal
Exif.Photo.DateTimeDigitized
Xmp.MicrosoftPhoto.DateAcquired
Those are different fields and last one is not even EXIF field. But different software use different terminology for Original and Digitized filed, like taken, acquired, created etc. That is the reason for all the confusion.
For example XnViewMP in the EXIF info tab shows DateTaken and DateDigitized. On the ExifTool tab same values can be find as DateOriginal and CreateDate.
Check it out for yourself.

But, back on topic.

2chiara.codagnone
I've just checked ImageMetaData plugin. It totally serve your need, without need of external or cmd tools.

After installing, select your images, open Change attributes dialog, check Change plugin attributes and set:
Plugin: jpg-comment
Property: Create date
Value: [=tc.name:7-8].[=tc.name:5-6].[=tc.name:1-4]

Property can also be DateTImeOriginal, or both, depending on your needs.
Value set this way will set the time to 00:00:00. You can add another entries after these for any particular time, either from filename if the time is also part of it or from the file itself.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: mass changing EXIF of jpg

Post by *petermad »

Fla$her wrote:The disadvantage is that in the current form, the fields will be named as in the old version, i.e. not short.
read_me.txt wrote:The field name is the second token. It can be any string, however .(dot) must not be used.
So you can just modify the second token to the short form (for all entries if you like).
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

solid wrote: ↑2023-01-31, 09:18 UTCBut different software use different terminology for Original and Digitized filed, like taken, acquired, created etc. That is the reason for all the confusion.
For example XnViewMP in the EXIF info tab shows DateTaken and DateDigitized. On the ExifTool tab same values can be find as DateOriginal and CreateDate.
Check it out for yourself.
I have nothing to check here. You yourself are confused in the search for truth. The fact is that the fields are different.
DateTaken = DateTimeOriginal β‰  DateTimeDigitized β‰  DateAcquired β‰  CreateDate.

petermad wrote: ↑2023-01-31, 09:49 UTCSo you can just modify the second token to the short form (for all entries if you like).
I know, that's why I wrote "in the current form".
Overquoting is evil! πŸ‘Ž
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: mass changing EXIF of jpg

Post by *solid »

Fla$her wrote: ↑2023-01-31, 10:08 UTC I have nothing to check here.
Then there is no point of further discussion.
Come back after checking,
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

solid wrote: ↑2023-01-31, 10:56 UTCCome back after checking,
Why would I check something I've known about for a long time? You yourself agreed that DateAcquired is not even Exif (in Ascii format), but Xmp (in XmpText format). What else do I need to check to make sure of this once again? Install a 100-megabyte program for this? What for? It's enough for me to look at the data output again.
Overquoting is evil! πŸ‘Ž
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: mass changing EXIF of jpg

Post by *solid »

Fla$her wrote: ↑2023-01-31, 20:12 UTC
solid wrote: ↑2023-01-31, 10:56 UTCCome back after checking,
Why would I check something I've known about for a long time? You yourself agreed that DateAcquired is not even Exif (in Ascii format), but Xmp (in XmpText format). What else do I need to check to make sure of this once again? Install a 100-megabyte program for this? What for? It's enough for me to look at the data output again.
Because, as I already wrote, those same fields in different software are referred to with different names. We don't know what program OP uses and what name it uses, but he clearly asked for EXIF field. And that is possible to do, both ways I suggested to him, contrary to your claim.

Take a photo with camera or phone and check the values of the fields, not the names. Then check with some other software, you'll see the same values, but names may be different. But if you always check with the same program, of course that you'll get the same result (names).

I've seen EXIF's Date.original interpreted as Date acquired, even when the jpg didn't have Xmp profile.
What I haven't seen yet are different values for Date.original and Date.digitized on original camera photos, although they are different fields in the specs.
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

solid wrote: ↑2023-02-01, 10:26 UTCAnd that is possible to do, both ways I suggested to him, contrary to your claim.
I've seen EXIF's Date.original interpreted as Date acquired, even when the jpg didn't have Xmp profile.
My statement is supported by a screenshot, but yours is unfounded so far. Attach a screenshot of the program you are using, which shows Data Acquired as a DateTimeOriginal and provide a link to the file for reconciliation.
If the author departs from canonical names in this way, then this is not good. But I'm still curious.
solid wrote: ↑2023-02-01, 10:26 UTCTake a photo with camera or phone and check the values of the fields, not the names. Then check with some other software, you'll see the same values, but names may be different. But if you always check with the same program, of course that you'll get the same result (names).
I don't see any point in taking additional photos. And to believe that a person who understands the subtleties of meta tags uses only one program is at least strange. Do you need a list of all the graphics programs that I use? I think it's unnecessary.
solid wrote: ↑2023-02-01, 10:26 UTCWhat I haven't seen yet are different values for Date.original and Date.digitized on original camera photos, although they are different fields in the specs.
It doesn't matter what you seen. It is important that these are different meta tags, and I have clearly demonstrated this to you. This is how, for example, it looks in IrfanView and XnView.
Overquoting is evil! πŸ‘Ž
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: mass changing EXIF of jpg

Post by *petermad »

Fla$her wrote: ↑2023-02-01, 19:51 UTC This is how, for example, it looks in IrfanView and XnView.
Interesting that your IrfanView shows two "DateTimeOriginal" fields - mine has a "Date Time" and a "DateTimeOriginal" plus the DateTimeDigitized.

Apart from that - XnView shows "Date taken" instead of "DateTimeOriginal" - so that proves the point that different software use different names for the same EXIF tag.

And for my unchanged camera photos DateTimeOrignal, DateTimeDigitized and Date Time always shows the same value, so even though they are different tags and can be set to different values with for example the jgp-commnet plugin, it doesn't seem that the camera manufactureres really make a distinction here,

So the question is which one of the tags chiara.codagnone really wanted to set - since the tag OP mentiones is "Date Acquired" which is clearly not an EXIF tag. Maybe "Date Acquired" is a translation which really covers the DateTimeOriginal tag.

____________________

I also tested the jpg-comment plugin used with and without the jpg-comment.ini (renamed jpg-comment.old.ini) file:

With the jpg-comment.ini file there are these 3 date tags:
Exif.Image.DateTime
Exif.Photo.DateTimeOriginal
Exif.Photo.DateTimeDigitized

Without using the jpg-comment.ini file the same 3 tags are called:
ModifyDate
DateTimeOriginal
CreateDate

---
In IrfanView these 3 EXIF tags are called:
DateTime
DateTimeOriginal
DateTimeDigitized

And in XnView / XnView MP they are called
Date modified
Date taken
Date digitized

In Imagine the 3 tags are called:
Date/Time
Date/Time original
Date/Time digitized
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Fla$her
Power Member
Power Member
Posts: 2298
Joined: 2020-01-18, 04:03 UTC

Re: mass changing EXIF of jpg

Post by *Fla$her »

petermad wrote: ↑2023-02-01, 22:28 UTC Interesting that your IrfanView shows two "DateTimeOriginal" fields - mine has a "Date Time" and a "DateTimeOriginal" plus the DateTimeDigitized.
There's nothing interesting here. It's just that the author didn't think about how to distinguish Exif.Photo.DateTimeOriginal and Exif.Image.DateTimeOriginal. That's all. See the previous screenshot.
petermad wrote: ↑2023-02-01, 22:28 UTCApart from that - XnView shows "Date taken" instead of "DateTimeOriginal" - so that proves the point that different software use different names for the same EXIF tag.
DateTaken is quite a canonical name, and DateTimeOriginal is an short for the actual name of the Exif tag. I pointed out their equivalence above:
Fla$her wrote: ↑2023-01-31, 10:08 UTCDateTaken = DateTimeOriginal
There is no point in discussing them. My question was only about the requested DateAcquired.

petermad wrote: ↑2023-02-01, 22:28 UTCthough they are different tags and can be set to different values with for example the jgp-commnet plugin, it doesn't seem that the camera manufactureres really make a distinction here
It's not about what they do or not, but how it can be used by the user given the presence, absence or potential change. The dates of creation, writing and access also coincide when photographing. It doesn't mean anything.
petermad wrote: ↑2023-02-01, 22:28 UTCMaybe "Date Acquired" is a translation which really covers the DateTimeOriginal tag.
This is possible, but requires confirmation from the author of the topic. I doubt it yet.
Overquoting is evil! πŸ‘Ž
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: mass changing EXIF of jpg

Post by *solid »

Fla$her wrote: ↑2023-02-01, 19:51 UTC
solid wrote: ↑2023-02-01, 10:26 UTCAnd that is possible to do, both ways I suggested to him, contrary to your claim.
I've seen EXIF's Date.original interpreted as Date acquired, even when the jpg didn't have Xmp profile.
My statement is supported by a screenshot, but yours is unfounded so far. Attach a screenshot of the program you are using, which shows Data Acquired as a DateTimeOriginal and provide a link to the file for reconciliation.
If the author departs from canonical names in this way, then this is not good. But I'm still curious.
solid wrote: ↑2023-02-01, 10:26 UTCTake a photo with camera or phone and check the values of the fields, not the names. Then check with some other software, you'll see the same values, but names may be different. But if you always check with the same program, of course that you'll get the same result (names).
I don't see any point in taking additional photos. And to believe that a person who understands the subtleties of meta tags uses only one program is at least strange. Do you need a list of all the graphics programs that I use? I think it's unnecessary.
solid wrote: ↑2023-02-01, 10:26 UTCWhat I haven't seen yet are different values for Date.original and Date.digitized on original camera photos, although they are different fields in the specs.
It doesn't matter what you seen. It is important that these are different meta tags, and I have clearly demonstrated this to you. This is how, for example, it looks in IrfanView and XnView.
No, I didn't provide a screenshot, but I did provide a way how to check it by yourself.

But, even better, you provided screenshots that shows what I'm talking about. In your screenshots can be clearly seen that IV and XN show different names for same EXIF tags. That's all.

I can't say why it is the way it is. I like to believe it is from translation issues, not authors ignorance. I've used dozens different photo viewers with many versions of each throughout the years and have seen many variations on naming of these fields.
But, to be honest it never bothered me neither I've paid any special attention. Because it was their value that I have interest, not the names, and they always had the same value - date and time the photo was taken.

SInce you already have XNView, check the Exif and ExifTool tabs in the Info panel and you will notice that even in the same program there are different names for the same tags.
Even TC's Imagine lister plugin has other names for those fields.
Don't trust me, check it for yourself.
petermad wrote: ↑2023-02-01, 22:28 UTC So the question is which one of the tags chiara.codagnone really wanted to set - since the tag OP mentiones is "Date Acquired" which is clearly not an EXIF tag. Maybe "Date Acquired" is a translation which really covers the DateTimeOriginal tag.
About OP's issue, I think he already solved it and we won't hear from him again. I also believe that he used the term acquired for the date the photo was taken, not for exact metadata field.

BTW, thanks for checking and confirming on this.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: mass changing EXIF of jpg

Post by *Usher »

solid wrote: ↑2023-02-02, 10:45 UTC I think he already solved it and we won't hear from him again.
SHE, HER. As far as I know Chiara is an Italian female name.
Andrzej P. Wozniak
Polish subforum moderator
Post Reply