Copying xml files to a chosen directory

I want to determine if there's any xml files exist & if so copy each xml to that directory. Is my code correct for doing that? I can't test my script yet. Somebody please explain it to me please?

if [[ "$xmlFileNames" == "" ]]; then
	#print "No  Status type  XML files received from server in $DIRECTORY"
else
	for xmlFileName in ${xmlFileNames}
	    do 
	        xmlFileName=$(echo $xmlFileName | sed 's|./||')     # Remove leading ./ path that find command prefixes to filenames
	   
	        cp -f $xmlFileName $DIRECTORY/$xmlFileName
	done
fi

You need to remove the # from this line, or replace it with a : (colon) to avoid a syntax error.

	#print "No  Status type  XML files received from server in $DIRECTORY"

The script seems to be okay.

There's no need to remove ./ from the filename.

$DIRECTORY/$xmlFileName

is the same as

$DIRECTORY/./$xmlFileName

You're the best! Thanks again Scott!