Find Set of files

All,

I am trying to find a set of files, it could be one file OR set of file ,
all with extension .DAT
I need to do some acticity, only if the files exist in a partificular folder
like

if [ ! -f $Landing/*.DAT ]; then
                CntV=`ls $Landing/*.DAT |wc -l`
                echo "Lst Value " $Cnt
               if [ $CntV -lt 1 ]; then
                        echo No Landing Files in  $LandingZP
                         exit ....

I still get the unix error for the files not found ,

*.DAT: No such file or directory

can someone pls tell me , what's wrong in the code or Approach ?

Thanks
-

Then test for the presence of .DAT files instead of negating the test...

 if [ -f $Landing/*.DAT ]
ls $Landing/*.DAT >/dev/null 2>&1

if [ $? -eq 0 ]
then 
  echo yes
fi
set -- "$Landing"/*.DAT
[ -f "$1" ] &&
  printf 'number of .DAT files in %s: %d\n' "$Landing" $# ||
    printf 'no .DAT files in %s\n' "$Landing"

The set -- part will reset your positional parameters.