Rename file with the parent folder has name

hi, I want to make a button to rename all files in a folder, and the new name must be the name of the folder plus the name of the file, but I cant get the Idea.

someting like this:

can somebody help me with this one.

Here is how I would do it.

First select a test file or two, then launch the Opus advanced rename dialog box and configure it like below. Next save that rename as a preset (in this example I called my preset "test rename" without the quotes) and reference it in a button command like so:

Rename PRESET="test rename"

Note you will need to select the files first before running the rename command.

Or create new button with this code

Rename TO="{parent1}_{name}" FILEINFO 


that's what I need, let me try it and I let you now!. thanks for the response