Hello!
The last days i tried to figure out how exiftool works, but there are some questions left, hope you can help me!
I have a bunch of picture shot in 2004... What i want to do is to delete all the Metadata (exiftool -all=) but keep all the dates/times in the file!
is that somehow possible?
If i display all the times available in one file (exiftool -a G1 -s -time:all FILE) it looks like this:
FileModifyDate : 2004:08:19 13:44:28+02:00
FileAccessDate : 2012:12:07 16:00:20+01:00
FileCreateDate : 2012:12:07 16:00:20+01:00
ModifyDate : 2004:08:19 14:44:27
DateTimeOriginal : 2004:08:19 14:44:27
CreateDate : 2004:08:19 14:44:27
but if i use the command to delete Metadata (exiftool -all=) there will be only this left: so there is no original time left when the photo was taken and ModifyDate, DateTimeOriginal, CreateDate is gone :-(
FileModifyDate : 2012:12:07 16:10:02+01:00
FileAccessDate : 2012:12:07 16:10:02+01:00
FileCreateDate : 2012:12:07 16:00:20+01:00
Sorry for my bad english :-( How can i solve this?
Thank you!
Reading this section of the application documentation may help:
--TAG
Exclude specified tag from extracted information. Same as the -x option. May also be used
following a -tagsFromFile option to exclude tags from being copied, or to exclude groups from
being deleted when deleting all information (ie. -all= --exif:all deletes all but EXIF information).
But note that this will not exclude individual tags from a group delete. Instead, individual tags
may be recovered using the -tagsFromFile option (ie. -all= -tagsfromfile @ -artist). Wildcards
are permitted as described above for -TAG.
- Phil
Hi Phil! Thanks for your fast reply
So i tried this now (just to see if it deletes everything except the EXIF data)
exiftool -all= --exif:all FILE (location of file)
but the following Warning appeared:
Warning: [minor] Adjusted MakerNotes base by -264 - FILE (location of file)
0 image files updated
1 image files unchanged
It looks like there was only EXIF information in this file.
- Phil
Thanks Phil!
instead of exif:all i hat to use exifIFD:all --> then it worked very well...
so i went one step further just leaving all the times left with:
exiftool -all= -tagsfromfile @ -CreateDate -ModifyDate -DateTimeOriginal FILE
so it looks like this now: exactly what i wanted...
[System] File Modification Date/Time : 2012:12:07 17:46:03+01:00
[System] File Access Date/Time : 2012:12:07 17:50:08+01:00
[System] File Inode Change Date/Time : 2012:12:07 17:46:03+01:00
[IFD0] Modify Date : 2004:08:25 13:01:03
[ExifIFD] Date/Time Original : 2004:08:25 13:01:03
[ExifIFD] Create Date : 2004:08:25 13:01:03
But one last thing: There will be a new *.jpg created and when i open it in my Mac Finder
the Created, Modified, Last Opened dates are set to today and not the date the picture was taken... (see the attachment)
I guess the Finder on the mac just reads the [System] Times since the Exif Dates are correct...
So how can i change the System Dates (Created, Modified)? to the Exif Dates?
You can use the -P option to preserve the FileModifyDate. The only way to preserve the file creation date is to use -overwrite_original_in_place, but this is not the best solution since it is slow and will overwrite the original.
If the FileModifyDate has already been changed, you can set it to the EXIF ModifyDate with "-filemodifydate<modifydate" in the command.
- Phil
Hi Phil! Thanks a lot!
I just managed to change the FileModifyDate and FileAccessDate by using
DateTimeOriginal>FileModifyDate so it looks like:
FileModifyDate : 2004:08:19 14:44:27+02:00
FileAccessDate : 2004:08:19 14:44:27+01:00
FileCreateDate : 2012:12:07 16:00:20+01:00
ModifyDate : 2004:08:19 14:44:27
DateTimeOriginal : 2004:08:19 14:44:27
CreateDate : 2004:08:19 14:44:27
but if i want to change the FileCreateDate with:
DateTimeOriginal>FileCreateDate
doesn't work...just says nothing after i pressed the Enter button..
how can i change the FileCreateDate?
By the way what does the +2:00 and +1:00 in the FileAccessDate and FileModifyDate mean?
Unfortunately the FileCreateDate tag is not available in ExifTool on Mac systems. There is a work-around that may allow you to set this. See the FileCreateDate tag notes in the Extra tags documentation (https://exiftool.org/TagNames/Extra.html) for details.
The +02:00 and +01:00 are the time zone offset of your system at these times.
- Phil
I did the whole editing in windows... :-) so it should work?
In Windows you should be able to set the FileCreateDate if you are using ExifTool 9.07 or later.
- Phil
Thanks Phil everything worked!
only one more thing:
I managed to change the CreateDateFile so it looks like this:
FileModifyDate : 2004:08:19 14:44:27+01:00
FileAccessDate : 2004:08:19 14:44:27+01:00
FileCreateDate : 2004:08:19 14:44:27+01:00
ModifyDate : 2004:08:19 14:44:27
DateTimeOriginal : 2004:08:19 14:44:27
CreateDate : 2004:08:19 14:44:27
but when i close the cmd.exe and read the file again, the FileCreateDate is again changed to todays date :-(
???
That is no good. I'll have to test this when I get a chance.
- Phil
Hey Phil!
Just found out why:
The photo i changed with exiftool (all the 6 times) stays the same... in Windows if you do a do a copy of that file the FileCreateDate will be changed... (for example a copy of the original to a usb flash drive)
But: if you cut it out with CTRL - X and then paste it it wont change...
so i think its not exiftool, its windows that messes this up.. :-)
Another Question:
I have some scanned Images with no MetaData... is there a way to create Exif Tags for ModifyDate, DateTimeOriginal and CreateDate?
Quote from: GuitarMaster on December 07, 2012, 02:18:49 PM
Another Question:
I have some scanned Images with no MetaData... is there a way to create Exif Tags for ModifyDate, DateTimeOriginal and CreateDate?
Yes:
exiftool -alldates="SOME DATE" FILEor
exiftool "-alldates<filemodifydate" FILE"AllDates" is a shortcut for DateTimeOriginal, CreateDate and ModifyDate.
- Phil
Thank You !!!! GREAT!!
Hey Phil! Hope you still read this post...
Will there be some kind of Shortcut function for all the System Times in Future versions of ExifTool? like the "-AllDates" (changes all EXIF Dates)
There are no plans to add a shortcut for the system date/time tags, but you can always create your own user-defined shortcuts. See the Shortcuts section of the sample ExifTool config file (https://exiftool.org/config.html) for details.
- Phil
Super!
one more question:
These are the times/dates of a picture:
FileModifyDate : 2004:08:19 14:44:27+01:00
FileAccessDate : 2004:08:19 14:44:27+01:00
FileCreateDate : 2004:08:19 14:44:27+01:00
ModifyDate : 2004:08:19 14:44:27
DateTimeOriginal : 2004:08:19 14:44:27
CreateDate : 2004:08:19 14:44:27
The ExifTimes (ModifyDate, DateTimeOriginal, CreateDate) are the exact times/dates the picture was taken (local time in that country that day)
on the Mac, the finder displays the System times... so because of the Time Zone it says +1:00 which is not the local time the picture was taken.
So is there something that i can just delete that TimeZone information? so that it looks like:
FileModifyDate : 2004:08:19 14:44:27
FileAccessDate : 2004:08:19 14:44:27
FileCreateDate : 2004:08:19 14:44:27
ModifyDate : 2004:08:19 14:44:27
DateTimeOriginal : 2004:08:19 14:44:27
CreateDate : 2004:08:19 14:44:27
Thanks!
I don't understand. ExifTool always displays timezone information if it is available, and this can't be deleted from the System tags because the system always knows the time zone. The real unfortunate thing is that the timezone isn't stored in the EXIF tags (this is a BIG oversight in the EXIF specification).
But if you just want to remove the timezone from the displayed information, you could create a user-defined Composite tag to do this. Then you could have a Composite:FileModifyDate tag which didn't have a timezone, and this tag would be displayed instead of the System:FileModifyDate tag unless you used the -a option (in which case both would be displayed).
- Phil