My first useful script: renamed 400 holiday photos
Phone + camera photos had different naming schemes, so sorting by name was chaos. Wrote a script that reads the date from each file and renames everything to 2026-08-14_153012.jpg. 400 photos in two seconds. Feels like magic.
Comments 6
Join the discussion CommentAlready have an account? Log in
This is the best kind of first project. Did you read EXIF data or the file modification time?
EXIF with Pillow, falling back to modification time when EXIF is missing (screenshots, mostly).
Nice fallback. Did you handle two photos taken in the same second?
Not at first... two photos overwrote each other 😬 Now I add _1, _2 if the name exists. Lesson learned: always test on a copy.
"Always test on a copy" is the real lesson of every file script ever.
Congrats! These small wins are what keep you going.