Skip to content

Instantly share code, notes, and snippets.

View alexwlchan's full-sized avatar

Alex Chan alexwlchan

View GitHub Profile
@alexwlchan
alexwlchan / organize-photos.py
Last active January 2, 2016 08:59 — forked from cliss/organize-photos.py
My fork of @cliss’s photo management script. Tweaked to: * Get date from `os.path.getmtime(f)` (lifted from @jdmonaco’s fork) * Sort any format with a three-character extension (currently .JPG, .TIF, .PNG and .MOV). Edit the list in line 40 for more formats. It also normalises extensions to lowercase. * Tweaked some bits of the code * Moves file…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################