Skip to content

Instantly share code, notes, and snippets.

@andreppires
Last active January 29, 2019 11:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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