Name files according to folder, move through all folders in a path

Advanced Renamer forum
#1 : 13/08-16 17:56
Posts: 1
Hi there

Most probably scripting would help, but I haven't used it in this context. Anyone done someting like that?:

I have a number of subfolder
C:\abc\def1 (containing files xyz1.doc, xyz1.xls) [assuming no duplicate extensions]
C:\abc\def2 (containing files xyz2.doc, xyz2.xls)
I'd like to
a) rename all files in a subfolder with folder_name.ext, e.g.
xyz1.doc -> def1.doc
b) move the files from the sub folder into a specified folder, e.g. c:\hij\
c) do that for all sub folders, e.g. within c:\abc\

Any script that would work that way? Many thanks for your assistance!

13/08-16 17:56