Skip to content

Instantly share code, notes, and snippets.

@andreppires
Last active January 29, 2019 11:40
Show Gist options
  • Save andreppires/6d014a766fb053d9ddb8d8bd12573733 to your computer and use it in GitHub Desktop.
Save andreppires/6d014a766fb053d9ddb8d8bd12573733 to your computer and use it in GitHub Desktop.
[Delete crappy (raw) photos] I shoot photos in RAW and JPG. To delete unnecessary raw files I delete the bad JPG photos doing a preview to all photos. Then I run this script to remove the raw files too.
for x in *.CR2
do
echo $x
FILE="./"${x%.*}".JPG"
echo "File= "$FILE
if [ -f "$FILE" ];
then
echo "File $x exist"
else
echo "File $x does not exist. Removing."
rm $x
fi
done
echo "Removing Darktable files"
rm *.xmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment