How to Automatically Rename Parent Frames Based on Child Layer Text in Figma?

Hello Figma Community,

I downloaded an icon pack with 4000 icons. I want to add a frame to each icon and make them components, but the icon names got changed like “Frame 1” and so on…

So, in short, I would like to rename each parent layer(frame) based on the text of the child layer (icon name).

Is there a way to automate this process in Figma? Any solutions or plugin recommendations would be greatly appreciated.

Thank you in advance for your help!