Phototime
Posted by
@nkiit
on Wednesday, March 30, 2011
Code is alright, but I have always been looking for opportunities to write small scripts, little things to automate life. Now, when I have the opportunity, I was only too glad to indulge myself.
I have been maintaining a photo-log since a few days, and that means a lot of photos everyday. The least I hope to gain out of this exercise is to know how my life progressed over a year.
So I figured I would have to name them consistently with their date and time as the file names.
What would let me do this ? Either have the camera's processor run the code (very far-fetched, true, but it might be a possibility) or have a script on my computer to do the same.
So I chose this opportunity to write a small Python script to rename all photos in a folder in such a fashion.
What it exactly does is :
Supply the path to a photo folder as a command line argument, something like :
python phototime.py /path/to/your/photos
and the rest is taken care of.
I've uploaded the project to a Github repository. You can download it from here.
Please leave back feedback if its useful or if it sucked. Remarks and suggestions for modifications are most welcome.

This work by Ankit Daftery is licensed under a Creative Commons Attribution-Share Alike 2.5 India License.



2 comments:
You should use photo metadata for this. I used to use the photo name for dates as well earlier- but that doesn't play nice with other photo-tools that look at the metadata for this information.
I checked the metadata. The "Accessed" date changes to when the code is run. The "Modified" date remains the same.
Post a Comment