Renaming parent based on the file

Is this possible? It’s the opposite of renaming the file based on the parent.

It’s renaming the parent based on the file.

Imagine you are inside a directory. You select a file inside it and want the parent to be renamed to this selected file.

Do you mean something like

Rename REGEXP PATTERN "(.)(..)" to "\1\\0"


You have to modify this a bit, since it only puts the file into a folder of the same name instead of renaming the parent folder.

This will rename the parent folder to the same name as the selected file/folder (excluding file extension):

@firstfileonly Rename {filepath$|..|noterm} TO {file$|noext}

Thank you very much. Works perfectly. Makes life so much easier!

Great button! Is there anyway to change the code to get the opposite result, i.e. rename the selected file/folder with the same name as the parent folder. I tried switching the two bracketed commands but it gave me an error. Any ideas?

Try this code:

Rename to="{parent}.{ext}" FILEINFO 

That is awesome! Thanks so much :smiley: