Cleaning leftover RAW images after selecting images based on JPEGs

You probably know this problem, if you own a DSLR yourself. You take a lot of images in combined RAW+JPEG mode, then trash bad shots by checking the JPEGs on your computer. In the end, the RAW images (*.CR2 for my Canon EOS DSLR) are left over in the same folder. This was the reason why I wrote this Python script: remove-orphaned-raw-images.py :

You can use the bash to run this cleanup script in every subfolder of your picture library top folder:

# Go to your picture library top folder:
cd ~/your/image/folder
# Now run the cleanup script in every subfolder:
find . -type d -depth 1 |
while read folder
do
  echo "Checking $folder"
  remove-orphaned-raw-images.py "$folder"
done

# To list all backup folders, run:
find . -type d -name raw_orphans | while read folder; do echo "$folder"; done

Resources

Comments