check the file size

if [ -s /tmp/testfolder/*.* ]; then
   cp /tmp/testfolder/*.* ~/new/logs/
else
   echo "No files today"
        exit
fi

The problem is this doen't work when there is more than 1 file. Please tell me how to
take the latest file and check the size of the file in a directory

Probably u can try this

for file in `ls -t|head -1`
do
if [ -s $file ]; then
   cp /tmp/testfolder/*.* ~/new/logs/
else
   echo "No files today"
        exit
fi
 
done