I Dare You!

by peter_budo

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'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

1 Answer 1

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.