Forgotten in its old age

by Aditya

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

I have been using Exifer for many years to re-date and re-name my photos based on the EXIF dates from the camera(s).

I have now started using some alternative camera apps available on the iPhone (specifically Plastiq Camera and Hipstamatic) but these do not save any EXIF information in the images.

What I would like to do then is to insert the Date Digitised, Date Taken and Date Modified EXIF values based on the JPG file's Modified Date (which is correct to the time of taking the photo) and to also set the Make to Apple and Model to iPhone 3GS (although the process would apply to any JPG image which has no EXIF data, regardless of the source)

I have looked at Exifer, IrfanView, ExifTool, Picasa and others and they either cannot set the dates at all or can only set them to a specific date/time.

So, is there any software available which will automatically set the EXIF Dates based on the file's Modified date property?

Or, is there some switch in ExifTool that I have missed possibly?

I would like to be able to do this as a batch on a folder of images.

EDIT: Following John's answer, this is the Windows .bat file I created to do this. The order of commands is important so as not to overwrite any of the dates with other commands.

"D:\Program Files\ExifTool\exiftool.exe" "-FileModifyDate>AllDates" *
"D:\Program Files\ExifTool\exiftool.exe" "-Make=Apple" *
"D:\Program Files\ExifTool\exiftool.exe" "-Model=iPhone 3GS" *
"D:\Program Files\ExifTool\exiftool.exe" "-FileModifyDate<DateTimeOriginal" *

Pause
share|improve this question
    
FWIW, Hipstamatic now includes EXIF data. Make a feature request to Plastiq Camera to do the same. –  mattdm Jan 31 '11 at 13:40
    
@mattdm - Yep, they have done for a few versions now. Makes things much easier! –  Shevek Feb 1 '11 at 9:25

5 Answers 5

up vote 10 down vote accepted

I think you can do it with ExifTool:

exiftool -v "-FileModifyDate>DateTimeOriginal" *

Tried on some copies of jpegs and it seems to have worked.

share|improve this answer
    
Awesome! Many thanks –  Shevek Sep 1 '10 at 23:02
1  
In fact exiftool -v "-FileModifyDate>AllDates" * did all 3 dates –  Shevek Sep 1 '10 at 23:05
    
@Shevek - You're quite welcome! –  John Cavan Sep 2 '10 at 0:24
    
Great, many thanks! I needed this to make ImageMagicks mogrify tool imprint the timestamp on photos when there where no EXIF dates inside. –  leberwurstsaft Jul 4 '12 at 20:00

You can also use ACDSee 14 to redate files in many, many different ways, in single or in batch mode. An excellent program, but maybe overkill for the Original Poster's problem. Much improved from ACDSee 7 from years ago!

share|improve this answer

This can be done with a Python script, along the lines of:

import sys, os, datetime
filename = sys.argv[1]
ts = datetime.datetime.fromtimestamp(os.stat(filename).st_mtime)
ts_string = ts.strftime('%Y-%m-%d %H:%M:%S')
os.system('some_exif_tool -ts "%s" "%s"' % (ts_string, filename))

(I know this isn't really photographer-friendly answer, there's hope it might be helpful for someone.)

share|improve this answer

In addition to the much-more-powerful exiftool, one can also use jhead for simple things like this.

jhead -mkexif -dsft *.jpg

It will also handle renaming-based-on-time, so you can skip exifer entirely.

share|improve this answer

That last one with jhead is not a good solution. It reset all other properties of the exif header. I've tried it on some JPG files, and after treatment, all the camera fields were empty. Be careful.

exiftool preserved the camera details, and set the Date Taken and Creation Date fields to the same as the file attributes.

share|improve this answer
    
Akim, can you tell us more? Your answer sounds more like a comment, but it raises an interesting point also! And hello and welcome to the site! –  Paul Cezanne Mar 3 '13 at 22:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.