2

I had a look at this topic Is there a free program to (batch) change photo file's date to match EXIF? and it was very useful to change my photos' Date Created values to their rightful date in EXIF, but unfortunately the videos are not affected...

I am using EXIFTOOL on my MAC OSX Sierra with the following command

exiftool -r '-DateTimeOriginal>FileModifyDate' directoryname

Any ideas?


EDIT I added this image to help explain.

I'm trying to copy the actual date creation in the EXIF data to the remaining attributes which are used when sorting in my MAC

d

So the following listing options are updated too :

enter image description here

NLed
  • 123
  • 1
  • 4
  • Is your goal to set the file's "creation" time or its "last modified" time? – osullic Oct 13 '16 at 17:38
  • The exact opposite, the file's creation time based on actual EXIF data (when I actually took the video). When I currently export it from my Photos app on mac, the date created is in 2016, but right-click -> info shows 2012. – NLed Oct 13 '16 at 17:42
  • Several times in your question you state incorrectly what you are trying to achieve. In fact, what you want is not to set the file's "creation" time, but to set the file's "last modified" time to that which is recorded in the EXIF as CreationDate. – osullic Oct 14 '16 at 09:01
  • @osullic Under finder's listing, Date Created and Date Modified and Date Added are all the same, but Date Created in the EXIF data is completely different. Hence the confusion in terms. – NLed Oct 14 '16 at 09:08
  • Date Created and Date Modified and Date Added might be the same for some file (or set of files). But these are all distinct file properties, and I'm just saying that you need to be clear (both for yourself and for others) about which one you want to change. – osullic Oct 14 '16 at 12:21
  • Question has been answered.@osullic – NLed Oct 14 '16 at 15:02

2 Answers2

2

So you want to set the file's "creation" time, but you are using FileModifyDate in your command, which presumably is for setting a file's "last modified" date. I think you should be using FileCreateDate instead.

I am not that familiar with ExifTool, but I would suggest you at least read the FAQ. See in particular FAQ 16 "Some files not renamed" - I realise you are not renaming files, but this question does say, "By default, ExifTool only processes writable file types when any tag is being written and a directory name is specified on the command line", which may apply to your use case.

osullic
  • 12,093
  • 1
  • 23
  • 47
0

I'm late, but nonetheless I recently had the same problem with my iPhone created videos. My iPhone writes the creation date to the CreationDate tag but Lightroom ignores this tag and expects DateTimeOriginal.

I therefore wrote a short Bash script to set DateTimeOriginal from CreationDate if DateTimeOriginal does not exist yet (to avoid unwanted modifications):

#!/bin/bash

# If (video) file(s) miss EXIF tag DateTimeOriginal, copy it from CreationDate.
this=`basename "$0"`
if [[ "$#" == "0" ]]; then
    echo "Copies EXIF tag CreationDate to DateTimeOriginal if DateTimeOriginal is missing."
    echo "Usage: $this [OPTIONS] *FILE*"
    echo "    While *FILE* may be one or file more files or directories."
    echo "    By default original files will be overwritten. To keep a backup file, use -no_overwrite_original."
    echo "    For further options see exiftool --help."
    echo "Example: $this -r -ext mov -ext mp4 ."
    echo "    Processes all MOV and MP4 video files in this directory including subdirectories."
    exit 1
fi
overwrite_original="-overwrite_original"
if [[ "$*" == *-no_overwrite_original* ]]; then
    overwrite_original=""
fi
exiftool -if 'not $DateTimeOriginal' '-DateTimeOriginal<CreationDate' -P $overwrite_original $*
Spock
  • 151
  • 5