Page 1 of 1

Restore Photographs Created and Modified dates

PostPosted: Fri Dec 05, 2014 7:03 pm
by Paul1762
I have a number of photographs that have lost their orginal created and modified dates...

is there a way to restore photographs that have lost thier created and modified dates?

Paul

Re: Restore Photographs Created and Modified dates

PostPosted: Mon Dec 08, 2014 2:47 pm
by Mr_Noodle
Unless they are recorded elsewhere, not sure if that is possible.

Re: Restore Photographs Created and Modified dates

PostPosted: Wed Dec 24, 2014 10:55 am
by dhy8386
potentially yes using EXIFTOOL. The system create and modify dates may be distinct from other image file properties that have been retained because they are not modified normally by the OS. It depends on the devices that were used to take the pictures and what is stored. Download and install this tool: http://www.sno.phy.queensu.ca/~phil/exiftool/

Once installed, run the following in terminal:
Code: Select all
exiftool [path to image file]
in terminal. You will see the EXIF data and various date properties. Perhaps something like Create Date (different from file creation date) or Date/Time Original will have the retained image property values. If so, I have written a series of scripts that I use with hazel to modify the file create and modify dates to match these properties so as to retain the original values. Let me know and I can send them to you.

Re: Restore Photographs Created and Modified dates

PostPosted: Sat Dec 27, 2014 7:03 pm
by andy_vdg
You might be able to and there are two ways this could be possible.
Use A Better Finder Attributes which can set the date created / modified based on the EXIF date.
If no EXIF date exists but your files are named in a specific format i.e. 2014-12-24 13:23:43.jpg you can use this script in the terminal to set the date created / modified. You will need the Xcode Terminal Commands installed - your Mac should prompt you if you want to install them if you're running the command for the first time.
Code: Select all
for f in *.jpg;
do date=$(printf %s "$f" | sed -E 's|^(....)-(..)-(..) (..)\.(..)\.(..).*|\2/\3/\1/ \4:\5:\6|'); SetFile -m "$date" -d "$date" "$f";
done

Change this section to suit your naming convention:
Code: Select all
sed -E 's|^(....)-(..)-(..) (..)\.(..)\.(..).*|\2/\3/\1/ \4:\5:\6|'

2014-12-24 13.23.43.jpg
(....)-(..)-(..) (..)\.(..)\.(..).*|\2/\3/\1/ \4:\5:\6


Hope that helps.