Photoshop script to rename and export layers with just one click.

For certain projects you could need a Photoshop script to rename layers and export them as PNG, for example: videogame creators who needs items in Photoshop. It may also work for photographers who has hundred of photos.

1.- You create this structure.
2.- Just 1 click and get all layers renamed.
photoshop layers to png files
3.- Additionally you can export to files.

I created a Photoshop script to rename multiple layers based on the structure of the PSD file. It uses folder’s names as prefixes, this way you can rename hundreds of layers in Photoshop with just one click. Additionally you can export multiple layers to files while keeping the names.

How do I run the Photoshop script to rename and export layers?

Usage is quite straight forward, just need to open Photoshop, load the script and click ok. Backup your files before ūüėČ

“File > Scripts > Browse… locate the script and click OK”

If you have any problem, suggestion or complain, feel free to comment.

***Disclaimer: I made this script for my own use and while it worked smooth I suggest you backup your files before using.
freelance graphic designer


Feel free to reach me!!

Sergio Ordo√Īez Suanez
[email protected]

Hi there, I'm webmaster, designer and digital content creator of everything you see at SOSFactory. I love sharing my limited knowledge as more experienced designers did when I was a newbie.

  • radamosch
    Posted at 10:01h, 25 April Reply


    I got your avatar system (very nice – well done).

    When I try to batch rename in photoshop, it cries : The command ‚ÄúDelete‚ÄĚ is not currently available.

    Do you know what I’m doing wrong?


    • sergio ordonez
      Posted at 10:30h, 25 April Reply

      Thanks a lot Rada, the script delete the folders, that you used to add prefixes, once he is done renaming, I’m guessing this is the problem.
      Which Photoshop version are you using? Did you use folders to create the prefixes?

      Email me better to [email protected] so I can replicate the problem and offer you an alternative.

      • And
        Posted at 14:56h, 04 February Reply


        i have a question regarding the way it is named. is there a possibility that only groups would be added up in the naming process? so only HAIR-MAN-STYLE without ABC if i use your example in the pictures above.

        thank you

        • sergio ordonez
          Posted at 16:11h, 04 February Reply

          In that case you should create a folder named “hair”, inside another folder named “man” and the layers name should be “style”.

  • Raphael Jaimes- Branger
    Posted at 23:00h, 10 June Reply

    I cannot find where to download the files and scrpts

    • sergio ordonez
      Posted at 11:05h, 11 June Reply

      Hi Raphael, I have email you a couple of times but no reply on your side. Please, contact me so I can help you to resolve the issue.

      • Raphael Jaimes- Branger
        Posted at 20:43h, 11 June Reply

        SORRY Idid not notice I was still online. I left tyhe page open and forgot about it

      • Raphael Jaimes- Branger
        Posted at 20:49h, 11 June Reply

        I am on EST in Boston. We must be in different time zones that makes it difficult to do this live. but if you let me know what hours are good for you I’ll do my best to contact you then.

        • sergio ordonez
          Posted at 20:50h, 11 June Reply

          Raphael, are you receiving my emails? I emailed you twice. Please, check your email.

  • vimalkumar
    Posted at 03:32h, 19 July Reply

    i am trying to rename the layername by sa1,sa2 like that using javascript. for example if i select first layer it should rename to sa1 and move to top and if i select another layer and it should rename to sa2 and it should be moved to top. same name should not come again. can u help me with this

    • sergio ordonez
      Posted at 13:19h, 19 July Reply

      Sorry but I don’t understand what you want to achieve, could you elaborate step by step what you want the script should do?

Post A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.