test -f yourFile
FILE=/folder/yourFile
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "$FILE does not exist."
fi
If need to match wildcard in the file names
if test -n "$(find /dir/to/search -maxdepth 1 -name 'files*' -print -quit)"
then
echo found
else
echo not found
fi
Source:
https://linuxize.com/post/bash-check-if-file-exists/
https://stackoverflow.com/questions/6363441/check-if-a-file-exists-with-wildcard-in-shell-script