ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: shacho on February 13, 2011, 11:06:05 AM

Title: No Longer Able To Change File Dates
Post by: shacho on February 13, 2011, 11:06:05 AM
I often process photos from cellphones or other devices with cameras built in - devices where the EXIF implementation is always a big question.  I wrote this script to fix one such problem and synchronize the file dates with the shutter time stamp.  I'm pretty sure it used to work.  But now something seems to have changed.  Here's the script:

#!/bin/bash
exiftool -r -F -overwrite_original '-alldates<$datetimeoriginal' "$@"

The batch runs with no errors, but the File Creation and File Modified dates become the precise moment at which the script completes - not the datetimeoriginal date.  Is there a flaw in my command or is the OS doing this after the fact as it notices the changes?  Running Mac OS 10.6.6.

Shacho
Title: Re: No Longer Able To Change File Dates
Post by: Phil Harvey on February 13, 2011, 02:04:56 PM
Hi Shacho,

Your command writes the 3 common metadata date/time tags.  When writing, the filesystem creation and modification dates will be set to the current time.  You can use -P to preserve the filesystem modification date, or write FileModifyDate to set it to whatever you want.  ExifTool can not be used to set the filesystem creation date.

- Phil
Title: Re: No Longer Able To Change File Dates
Post by: shacho on February 13, 2011, 05:50:09 PM
Phil - Thanks for the reply.  You're right - I was confusing the tags with the file system metadata.  I recently trashed all my settings in Adobe Bridge and started clean, and some tags had disappeared from the viewer.  On a related note, I can't seem to find any documentation that maps exif tag names to their monikers in Bridge.  For example "File Modification Date/Time" in exiftool output is "ModifyDate" in exiftool input is "Date Time" in Bridge.  Do you know of any documentation that provides these mappings.  I can't seem to find any.
Title: Re: No Longer Able To Change File Dates
Post by: Phil Harvey on February 14, 2011, 07:31:43 AM
I don't get into details about what tags are displayed by other software and what they are called.  Your best bet is to start with a clean file and use Bridge to write the metadata, then use exiftool to see where it went (this is FAQ 3).

- Phil
Title: Re: No Longer Able To Change File Dates
Post by: shacho on February 14, 2011, 05:53:50 PM
Thanks Phil!  It's been a couple years since I read the manual and FAQs - looks like I'm due for a refresher.  Thanks again for your help.  Exiftool is an indispensable tool and we all appreciate your work.

Cheers,

Shacho