Author Topic: No Longer Able To Change File Dates  (Read 4360 times)

shacho

  • Newbie
  • *
  • Posts: 3
No Longer Able To Change File Dates
« 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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17467
    • ExifTool Home Page
Re: No Longer Able To Change File Dates
« Reply #1 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
...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 ($).

shacho

  • Newbie
  • *
  • Posts: 3
Re: No Longer Able To Change File Dates
« Reply #2 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.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17467
    • ExifTool Home Page
Re: No Longer Able To Change File Dates
« Reply #3 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
...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 ($).

shacho

  • Newbie
  • *
  • Posts: 3
Re: No Longer Able To Change File Dates
« Reply #4 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