Capture folder name as variable?

I have a folder full of subfolders containing fonts; and each font folder contains folders for the font type, like this
–"Fonts Folder"
––Font Name
–––"OpenType"
–––"OpenType TT"
–––"WOFF"
I want to reorganize these into subfolders based on font types:
-"New Fonts Folder"
––"OpenType Fonts"
–––FontName
––"OpenType TT Fonts"
–––FontName
––"WOFF"
–––FontName
But I'm not sure how to go about this - e.g., move the "OpenType" folder within the "Advocate" Font Folder, into the OpenType Fonts folder, and rename it from "OpenType" to "Advocate".
All comments appreciated. Thanks in advance!
Edit - I assume I should be looking at the Sort into subfolder action, and maybe the nested folder conditions. But I'm not sure how I would capture the name of the font folder as a variable to rename the font type folder once moved.
–"Fonts Folder"
––Font Name
–––"OpenType"
–––"OpenType TT"
–––"WOFF"
I want to reorganize these into subfolders based on font types:
-"New Fonts Folder"
––"OpenType Fonts"
–––FontName
––"OpenType TT Fonts"
–––FontName
––"WOFF"
–––FontName
But I'm not sure how to go about this - e.g., move the "OpenType" folder within the "Advocate" Font Folder, into the OpenType Fonts folder, and rename it from "OpenType" to "Advocate".
All comments appreciated. Thanks in advance!
Edit - I assume I should be looking at the Sort into subfolder action, and maybe the nested folder conditions. But I'm not sure how I would capture the name of the font folder as a variable to rename the font type folder once moved.