retaining file path

hi all,

Is there any way to retain file path?

echo "Please enter your old filename"
read a
#user input : /blah/blah1

echo "please enter the new filename"
read b
#user input : dumb

mv $a $b

What i would like to do is for the user to enter just the "filename" for the new filename instead of type in the "full path" which is /blah/dumb

What command should i use?

Please help.

Thank you

$ dirname /blah/blah1                                                              
/blah

Thank you

i love unix.......