You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
268 B
Bash

#!/bin/sh
# get total number of files
N=`ls -1 *.CR[23] 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 *.CR[23] raw/
else
echo "No files found."
fi