Author Topic: Setting File Dates  (Read 217 times)

Paxapunch

  • Jr. Member
  • **
  • Posts: 23
Setting File Dates
« on: March 24, 2020, 02:36:00 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16317
    • ExifTool Home Page
Re: Setting File Dates
« Reply #1 on: March 24, 2020, 09:21:26 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Paxapunch

  • Jr. Member
  • **
  • Posts: 23
Re: Setting File Dates
« Reply #2 on: March 24, 2020, 07:58:03 PM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 16317
    • ExifTool Home Page
Re: Setting File Dates
« Reply #3 on: March 25, 2020, 07:17:54 AM »
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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).