Changed the script to not perform the check to see if files exist, as there will always be files. I was running into a problem where there were too many files and bash was crapping out, stopping the script from completing.
#!/bin/bash
#Archive Yesterdays Images
YESTERDAY=`date --date='yesterday' +"%Y%m%d"`
TWOWEEKS=`date --date='14 days ago' +"%Y%m%d"`
DIR="/mnt/soho_storage/samba/shares/CCTV/$YESTERDAY"
RMDIR="/mnt/soho_storage/samba/shares/CCTV/$TWOWEEKS"
if [ ! -d "$DIR" ]; then
mkdir $DIR
fi
find /mnt/soho_storage/samba/shares/CCTV/ -maxdepth 1 -name "*$YESTERDAY*.jpg" | xargs -i mv {} $DIR/
#Delete older files/folders (14 Days)
if [ -d "$RMDIR" ]; then
rm -rf $RMDIR
fi