Rename a file to its parent folder's name

The command you want is:

Rename FROM=* TO={parent} IGNOREEXT

To make a toolbar button: How to use buttons and scripts from this forum

Alternatively, right-click menus can be edited via Settings > File Types > All Files > Context Menu.

Edit: That will work on all files and folders, whether selected or not. To only change what's selected:

Rename PATTERN=* TO={parent} IGNOREEXT