Here's a sample script that'll do the trick:
Code:
#!/bin/sh
for i in *.cdr*
do
mv $i "${i%%.cdr*}.cdr"
done
exit 0
explanation:
The for i in *.cdr* will assign to i all the filenames in the current directory that have a .cdr in between their name, one by one. The statement
scans the filename from the end, removes the longest part of i that matches .cdr* and returns the rest. Finally we add the .cdr extension to the truncated filename.