News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Setting File Dates

Started by Kenneth, March 24, 2020, 02:36:00 AM

Previous topic - Next topic

Kenneth

I have been using the following command to change the EXIF date data in hundreds of files very successfully:

exiftool -'FileCreateDate<$filename 111111' -'AllDates<$filename 111111' -execute -if '$Filename lt "1972"' -FileCreateDate=19720101000000 -common_args -overwrite_original_in_place -P .

However, I have come across a few files on which this command fails to perform the EXIF update desired. Here are a couple of the filenames:

1960-04-06 ~Home at South Eaton Street ~b.jpg
2019-09-06 ~Drake & Souy ~a.jpg

I have also attempted to change the EXIF dates in these files with commands like the following without success:

exiftool -AllDates=19720101000000 -FileCreateDate=19720101000000 -overwrite_original_in_place -P (filename)

or

exiftool -AllDates=20190906000000 -FileCreateDate=20190906000000 -overwrite_original_in_place -P (filename)

I just get the following return information:

# files weren't updated due to errors

How can I change the command line in order to obtain a more informative error message?

thanx

Phil Harvey

Try adding the -v (or -v2) option when writing to get a more verbose output of what is happening.

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

Kenneth

Thanx Phil, That enabled me to fix most of the problem. However I still get some like this:

## files weren't updated due to errors

with this error:

Error = [minor] Bad PreviewIFD offset for Nikon_PreviewIFD_0x0002

I did do a forum search on this error with zero results. Do you know what this error is and how to repair it?

Phil Harvey

Add the -m option to ignore minor errors.  A bad PreviewIFD is a common problem (I get 10 matches when I search for "bad PreviewIFD" in the forum), but it doesn't affect any metadata other than the proprietary makernote preview.

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