copy all files with the same filenames as those in another folder

Hi, all:

I've got two folders, folder A contains some image files (say, 100 files) in .jpg format;
folder B contains all description files (say, 500 files) in .txt format.

All image files in folder A are able to find their corresponding description files in folder B.
That is to say, regardless of file extension, 100 .txt files in folder B share the same name as those 100 .jpg files, for example 00011020.jpg in folder A is able to find its corresponding 00011020.txt in folder B.

Now, my question is:
How to just copy out the 100 description .txt files that share the same name as those 100 image files, out from folder B into folder C( or create folder C first, and then carry out the copy) ?

Looking forward to your help.

Best Regards
JIA Pei

for file in ./A
do
temp=`echo $file|cut -d"." -f1`
if [ -r ./B/$temp.txt ]
 then
 cp ./A/$file ./C
 cp ./B/$temp.txt ./C
fi
done 

Untested.

Try:

mkdir -p folderc 2>/dev/null
for i in foldera/*.jpg; do
  f=${i%.*}
  cp -p folderb/"${f##*/}".txt folderc
done

Thank you. This one works perfectly.

It's strange I don't have the privilege to tick that "Thanks" button in this board.