Hi, I'm assuming you don't want the last changed date you see on the file on your PC, but the creation date that the camera stored when the picture was taken.
Now I don't know much about that, but I thought it was interesting, so I did some Googling :-) I don't know whether it's always stored, but many cameras do. There are several formats. One of them is EXIF, no idea how universal that is, but it seems to be pretty wide spread. Unfortunately, the most common Python library for image stuff (PIL) doesn't handle this. However, some more Googling led me to the PyExif library ( http//pyexif.sourceforge.net/ ) and this post by someone who did the exact thing you want to do: http://www.leancrew.com/all-this/2007/08/photo_file_renaming_again.html Hope this helps :-) Remco On Nov 14, 2007 1:04 PM, Roy Chen <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to write a simple script that would rename a bunch of > photos according to their creation date, i.e. the date which the > photo was taken. > > Is there a way to use Python to obtain that information from the > image file, or is that information not stored in the file? > > Thanks, > Roy Chen > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor