commit 58fbd42982830cd41814b7642a58a1ba8ed796f9 Author: Emil Miler Date: Tue Sep 22 14:48:06 2020 +0200 Initial commit diff --git a/rawsort b/rawsort new file mode 100755 index 0000000..0db5e76 --- /dev/null +++ b/rawsort @@ -0,0 +1,18 @@ +#!/bin/sh + +# get total number of files +N=`ls -1 *.CR2 2>/dev/null | wc -l` + +if [ $N != 0 ]; then + # mkdir + if [ ! -d raw ]; then + mkdir raw + echo "Creating directory." + fi + + # move files + echo "Moving $N files." + mv *.CR2 raw/ +else + echo "No files found." +fi