do_rename() {
oldnum=$1 # assign parameters for clarity
newnum=$2
for f in "$oldnum".*; do # get all files matching the old number
mv "$f" "$newnum"."${foo##*.}" # use a parameter expansion to get the exetension of the current filename
done
}