Batch Change Sub Layer Names with Top Layer Names
Hello,
I have two questions,
First Question;
In order to export illustrator files to software such as Cinema 4D with correct layer structure and name , there should only be the lowest sub layer (one path) but with the top layer's name. I could not find an exact script to do that. I have 1000 layers like this.

Second Question;I want to copy and paste the names of top layers for all layers.

Please help, I could not find an exact script to do that.
Thank you,
Best Regards.