Check file if not found send mail if exit call second script

I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.

I need to check the file is present ="/home/Rvtools/test.csv"

if this file not found after the time retry send mail file not found
If the file exit run the second script and exit

cp /home/Rvtools/data/full/*.csv /home/Rvtools/test.csv 2> /home/Rvtools/error_outputs

counter=0
while [ ! -e /home/Rvtools/test.csv ]; do
      sleep 5
      counter=$((counter+1))
      if [$counter -ge 3 ]; then
      echo "file not found"| mailsend -f test@google.com -smtp IP -t test2@user.com -sub "Capacity_Report_$DATE_error" -attach "D:\brocade\cygwin\home\Rvtools\error_outputs" 
      else
      exec /home/Rvtools/vmware-capacity-V2.sh
      fi 
done

Trying to interpret your description of your script's behaviour, I'd infer that /home/Rvtools/test.csv exists from the beginning and the while loop is not entered at all. Run your script with the xtrace ( -x ) option set, and, if you're still stuck, post the output here for further analysis.

Be aware that the cp command fails with cp: target 'YY' is not a directory if multiple *.csv source files exist.
Be aware that the exec command "replaces the shell. No new process is created." (c.f. man bash ). Execution won't come back to your above scipt to finish the while loop and execute any eventual further code after the loop.
You might want to check your logics within the while loop, as - once the condition is true - nothing happens in the loop to modify that. Are you waiting for a background process to make that file appear somehow?

Be aware that the cp command failes with cp: target 'YY' is not a directory if multiple *.csv source files exist.
You might want to check your logics within the while loop, as - once the  condition is true - nothing happens in the loop to modify that. Are you  waiting for a background process to make that file appear somehow?

No i have checked this is file not director I am just copying the file to another director.

Or is it possible the check the error file

/home/Rvtools/error_outputs

if you find string "No such file or directory" wait for three time if not found then send mail file not found and exit the script

If file file found run the second script