by ʇolɐǝz ǝɥʇ qoq

Submit your Photo
Hall of Fame

Please participate in Meta
and help us grow.

Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. 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've got a collection of photos that I need to rename, however I want to keep track of their previous filenames.

Thinking the best way to do this copy the filename into the EXIF header, possibly in the comment field?

Looking for suggestions on the easiest way to do this - tried this with a few of the EXIF command line tools, but find EXIF/IPTC a bit confusing and am not sure that it's working correctly - especially since some of these posts are old.

share|improve this question

If you happen to use Linux, you can do this by running

for filename in *; do jhead -cl "$filename" "$filename"; done

in the photo directory. (Presuming you have jhead.)

In any OS, you just need to find a some Exif command line tool and a way to script the operation. Proper arguments for the tool should be in its documentation. Regarding the script, you'll probably get better answers on stack overflow or superuser.

share|improve this answer
Replace 'for file in l; do;' with 'foreach filename ();' if you are using tcsh or csh. – Itai Nov 6 '10 at 18:19

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.