Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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 apple.stackexchange.com/q/57648/9058 actually –  patrix Aug 4 '12 at 13:28
add comment

1 Answer 1

up vote 3 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"    
done

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
add comment

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.