move set of files to the target path with different extension

I have the following files in the dir /home/krishna/datatemp
abc.xml
cde.xml
asfd.txt
asdf_20120101-1.xml
asdf_20120101-2.xml
asdf_20120101-3.xml
asdf_20120101-4.xml

Now I need to move the files having the pattern asdf_20120101-*.xml to the dir /home/krishna/dataout with the extn as follows.
asdf_20120101-1.mcc
asdf_20120101-2.mcc
asdf_20120101-3.mcc
asdf_20120101-4.mcc

I may have any number of files matching the pattern asdf_20120101-*.xml. All the files needs to be moved to the path /home/krishna/dataout

can anyone help me out?

Thanks in advance.

Krishnakanth Manivannan

ksh and bash allow to work with strings to extract tokens etc...
I will give you this idea:

f - old file name,
n - new file name
 
$ f=asdf_20120101-4.xml
$ n=${f%.xml}.new; 
$ echo $n
asdf_20120101-4.new

use it in the loop :

for f in *.xml; do
... your mv command here to rename/move file
done