Command for renaming to a variable?

Hi Guys,

What I'm trying to do is quite simple; I've created a button that copies all the filenames to the clipboard, pastes them into a textfile and now needs to be renamed.
As the textfile always has the same name, I start my command like this:
Rename "Clipboard text.txt" to .....blabla

Now the blabla is the hard bit; I want to rename the file to the current name of the folder and add ".m3u" at the end.
How do I do this?
I've tried variables but so far I've got no luck...

Cheers,

Joe

Rename TO "{parent}.m3u" FILEINFO

Seems to work.

@JDM

Based on the nature of your question, I think you might want to take a look at the post from Nudel in this topic...