Automatic renaming of files in a folder

Is it possible to create a rename button to rename files in a folder to the name of that folder?
-file bla1.avi

Select Directory 1, press a rename button
file bla1.avi becomes Directory1.avi

I'm not familiar with regexp, so bear with me :unamused:

Is there only ever going to be one file in each folder?