Incense

by Bart Arondson

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.

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 12 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
2  
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

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

jhead -dsft *.jpg

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

In the case where your files do not have existing EXIF, you will need to create it, which jhead can also do, in the same pass with the addition of the -mkexif flag:

jhead -mkexif -dsft *.jpg

Of course, if your file does have EXIF headers already, don't use -mkexif. That part of the command does what it says and creates a whole new blank EXIF from scratch, as needed for files created by apps which don't themselves, as this question asks. If you just want to change the time without creating the EXIF, leave off that flag.

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

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

I finally found a tool that works easily without needing to script.

Here you go: http://www.relliksoftware.com/exifdatechanger/

share|improve this answer
    
It's not free for RAW files –  Shevek Oct 2 at 6:46

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.