I shoot RAW + JPG. My wife browses through the photos and deletes the throwaways. However, she only deletes the JPGs; the ARWs are left behind, and need to be deleted.
Anybody have a trick to use exiftool to identify (and delete or relocate) any ARW file that does NOT have a corresponding JPG in the same directory?
Thanks in advance to anyone who can help!
A sneaky trick like this should work:
exiftool -ext arw -directory=deleted -tagsfromfile %d%f.JPG -directory DIR
This will move all ARW files which don't have a corresponding JPG from DIR to the "deleted" directory.
(If the JPG doesn't exist, then the directory falls back to the default of "deleted". Otherwise it is moved to the same directory as it is already in... ie. it isn't moved)
- Phil
Oh, that is very cool. Adding that to my notes.
Thanks for the quick response - works great! Here's my final command:
exiftool -m -r -progress -ext arw -directory="$DESTDIR"/%-1:d -tagsfromfile %d%f.JPG -directory "$SOURCEDIR"
Great use of the %-1:d. Well done.
- Phil