Check on the files expected to be of single version

I need to put a check for the files that are expected to come from source as single version but if they are coming in multiple version, i need to fail the job.also .from the soource some multiple files ll be coming that are required.

e.g.5 files are coming from source.
aaa
bbb
ccc
ddd
eee
out of these aaa and bbb are multiversioned file(aaa_c1,aaa_c2,bbb_c1,bbb_c2) and rest are single versioned.so i need to prepare a code that can copy both types of files and also check that there should not be multi version of files for the files ccc, ddd and eee

... and what code have you written so far?

where are these files exist? in the same directory?

yes all the files are in the same directory

---------- Post updated at 01:35 AM ---------- Previous update was at 01:34 AM ----------

for name in `cat /tmp/cdw.txt`
do 
files=`ls $name*`
for file in $files
do
cp -p $SOURCE_DIR/$file $IN_DIR/$file
TmpRtnCd=$?
        if [[ $TmpRtnCd -ne $SuccessCd ]];then
                echo "[ERROR] Error $file is not found at source"
                exit $FailedCd
        fi
if  [ "$name" = "ecs_universe.dat" -o "$name" = "ecs_carveout" -o "$name" = "Goal_ecs_ctrl.txt" ];then
echo "[INFO] Files expected of single version are found"

---------- Post updated at 01:46 AM ---------- Previous update was at 01:35 AM ----------

hey ny body with code ......plz help me asap.
thanks in advance

like this?

while read file
do
   count=$(ls -1 $file* | wc -l)
   if [ "$count" -eq 1 ]; then
        echo "PASS"
   else
        echo "FAIL"
   fi
done < file.txt