Rename a file in a subfolder two levels deeper with the name of the upper folder

I have hundreds of files in subfolders which I want to rename according to the name of the marked folder. The structure is always the same and as follows (example):
Folder 0: "Gold plated material"
-- Subfolder level 1: "material"
---- Subfolder level 2: "38299"
Inside subfolder 2 is a file named: "Gold 01.mat"
My wish is, that this file will be renamed to the name of Folder 0: "Gold plated material.mat"
How can I do this?

Assuming there's only one file in each sub-folder that you want renamed, and that it always has a .mat extension, the following rename could do that. The top-level folder ("Gold plated material") was selected before clicking the Rename toolbar button.

Awesome! Thank you very much. Now I should be able to put this one to a button! Hope so...

Ha, don´t need a button. It works also with selecting different folders at once! I can´t imagine that there are people outthere who don´t use Directory Opus!

1 Like