|
|
@ -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
|