Add text to the existing folder name based on a file that is inside

Hi

I would like to be able to add text to the existing name of the folder based on the name of the files inside.

Example:

Folder name:

RENDER A1:

   Files Inside the folder:
       
    Image_001_METAL-TEXTURE.jpg
    Image_002_WOOD-TEXTURE.jpg

I would like to run a script that would rename the folder:

  RENDER A1 METAL

This will be very handy since I am managing thousands of folders and I can sort and group them later based on the new renamed folder names.

Thank you in advance.