Skip to content

Instantly share code, notes, and snippets.

@kiekerjan
kiekerjan / remove-orphaned-raw-images.py
Last active July 5, 2018 17:33 — forked from pklaus/remove-orphaned-raw-images.py
Do you own a DSLR? If so, do you transfer your images to your computer, then look at the JPEGs and delete the crappy ones? If you do, your RAW images may be leftover. This Python script helps you cleaning up your image folders after deleting unwanted JPEGs. See http://blog.philippklaus.de/2012/12/cleaning-leftover-raw-images-after-selecting-imag…
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Written on 2012-12-12 by Philipp Klaus <philipp.l.klaus →AT→ web.de>.
Check <https://gist.github.com/4271012> for newer versions.
Slightly adapted to include other RAW formats and to make the tool work in reverse (i.e. remove JPEGs for which no raw can be found.) The script also cleans Sidecar (.xmp) files if present.
Moved to python3 (see
"""