I would like to search a directory (should search only in that directory and shouldn't search in the recursive manner by searching inside the sub directories) with multiple file formats and even if anyone file format is available, I would like to execute the commands inside IF. If not, it should go to ELSE and throw the error. But, the below code is not working as expected. Please help me to fix the code. Also, I know there should be a simple way to write it in IF ELSE, but I am not sure how to do that.
cd /new_folder/dta
if [ ! -f /new_folder/dta/NY_* && ! -f /new_folder/dta/NC_* ];
then
echo -e "New Files are not available to process (or) Any one of the file/files are missing"| mutt -s "File Process " $MAIL_TO_SUPPORT
exit 1
fi
if [ -f /new_folder/dta/NY_* || -f /new_folder/dta/NC_* ];
then
mv /new_folder/dta/NY_* /new_folder/dta/NYFiles
mv /new_folder/dta/NC_* /new_folder/dta/NCFiles
fi
exit 0