Setting FileCreateDate Tag Fails

Started by ProAssist, June 09, 2016, 08:07:20 PM

Previous topic - Next topic

ProAssist

I copy image files to a new directory and then update the tags using: ExifTool.exe -XMP= -json="PhotoMetadata.json" -@ "ListAllFiles.txt" -overwrite_original

Most of the time everything works but sometimes the FileCreatedDate tag does not get updated but the other tags do get updated - If I re-run the exiftool command a second time then the FileCreatedDate tag gets updated.

Any ideas on what might be happening?

I am using exiftool 10.19 for Windows.

Thanks

Example PhotoMetadata.json File

{
  "SourceFile": "After-4045d6bb-4c30-4510-937b-83c6f02fe741.jpeg",
  "FileModifyDate": "2016:06:08 10:43:54-07:00",
  "FileAccessDate": "2016:06:08 10:43:54-07:00",
  "FileCreateDate": "2016:06:08 10:43:54-07:00",
  "JFIFVersion": "1 1",
  "ExifByteOrder": "II",
  "Make": "SAMSUNG",
  "Model": "SM-T230NU"
}

Phil Harvey

How do you tell that FileCreateDate wasn't updated?  By running ExifTool to check?  If you are looking in some other utility or in Windows Explorer, could it be that the creation date isn't getting refreshed properly?

And when it doesn't get set properly, what is its value?  The same as the original file, or the current time?

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

ProAssist

Yes, I run exiftool to list the metadata after it has been updated and verify each of the dates.

ExifTool.exe -if $make -p "$filename,$FileModifyDate,$FileAccessDate,$FileCreateDate,$ModifyDate,$DateTimeOriginal,$CreateDate,$GPSDateStamp,$DateCreated,$GPSDateTime" -m -n -ext JPG -ext JPEG -ext PNG *.*

When the FileCreatedDate tag does get updated it updates correctly from the values in the json file.

If I re-run the exiftool command a second time then the FileCreatedDate tag gets updated.

Thanks

Phil Harvey

But when it doesn't get updated, what is the date?  The same as the original file, or the current time?
...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 ($).

ProAssist


Phil Harvey

Interesting.  OK, let me look into this.

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

ProAssist

It does not happen every time so it is hard to track down - I thought it might be because the files are stored on a file server but I have seen the same thing happen on my local workstation.  I am adding some additional logging to my program and hopefully I will be able to see some kind of pattern.  I will let you know if I find anything.

Thanks

ProAssist

Not sure if this helps but I noticed that sometimes it sets the date correctly but not the time - The original file time remains.

Thanks

Phil Harvey

Thanks for mentioning this.  It is still on my list of things to check, but I don't fire up the Windows machine very often.

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

Phil Harvey

Just out of interest, do you still have the same problem with version 10.21?

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

ProAssist

Yes - The date will get set but not the time or both will not get set.  If the metadata does not get set I re-run exiftool in a loop.  If I add a pause after checking the metatdata it takes less attempts to set the metadata:

! This loop will execute up to 20 times but normally 5 or 6 times
Loop
   Set Metadata from json file using exiftool
   Output Metadata to text file using exiftool
   Read Output file and compare date and hour of time
   If date and hour have been set then exit loop
End

! This loop will execute up to 5 times but normally 2 or 3 times
Loop
   Set Metadata from json file using exiftool
   Output Metadata to text file using exiftool
   Read Output file and compare date and hour of time
   If date and hour have been set then exit loop
   pause for 10 seconds
End