3

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.

4

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .