Skip to content

Commit 63aea84

Browse files
committed
feat: Add photography raw file cleaner utility kk_clean_raw_files
1 parent 39261a7 commit 63aea84

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

kk_clean_raw_files

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Find .RAW files that does not has its .JPG counterpart and delests it
4+
5+
6+
rawfiles=`find . -name "*.CR2"`
7+
8+
for rawfilepath in $rawfiles
9+
do
10+
filename=${rawfilepath%.*}
11+
filepath="$filename.JPG"
12+
if ! [ -f $filepath ]; then
13+
rm $rawfilepath
14+
fi
15+
done

0 commit comments

Comments
 (0)