Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a folder with a bunch of photos taken by two different cameras, with one camera having been set to the wrong date. I managed to correct the EXIF date using Picasa (see photo.stackexchange), but apparently, it only adjusts the "Date Created" of the file, and not the "Date modified".

How can I make the "Date modified" (shown by default in the Finder) equal to the "Date Created" for a bunch of files?

I've looked in the touch terminal command, but couldn't find an answer there for my specific issue.

share|improve this question
Closely related to actually – patrix Aug 4 '12 at 13:28
up vote 4 down vote accepted

Assuming JPG files:

for f in *.jpg; do
   olddate=$(stat -f %SB -t %Y%m%d%H%M "$f")
   touch -m -t $olddate "$f"    

For other suffixes just adjust the pattern in the for statement accordingly.

share|improve this answer
Put it in an sh script, and worked perfectly for me. Thanks! – Rabarberski Aug 4 '12 at 13:26

Your Answer


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.