by Julieanne Kost

 Comments (19)

Created

September 20, 2010

If you’ve ever needed to add a text layer that contains the name of the open file here is a script to make it happen.

Download the script:  AddFileName20pt.jsx and double click to unzip the file.

Quit Photoshop.

Place the script in your Photoshop CS5/Presets/Scripts folder.

Launch Photoshop.

Open your image.

Select File > Scripts > AddFileName20pt

A word of caution, it is doubtful that the script will add the type layer at the exact size and in the exact position that you will want it. In order to make changes to the type style (size, font, color etc.), it is CRITICAL (especially if you are recording the script as part of an action) that you double click on the “Filename” type layer in the Layers palette and make changes to the type (font, size etc.) using the Options bar. Do NOT swipe the text in the image area or it will record that file’s name as part of the action and all of the following images will be named the same as the first one that you recorded!

Special thanks to Thomas Ruark at Adobe for creating this script.

COMMENTS

  • By Laser - 3:14 PM on September 27, 2010   Reply

    Where can I find the script to download?

  • By Julieanne Kost - 3:52 PM on September 27, 2010   Reply

    Sorry, I just updated the post and added a link to download the script.

  • By ina - 11:48 PM on December 26, 2010   Reply

    This script does not seem to work with Photoshop CS5… either that or it’s impossible to set the activeDocument to the currently open one

  • By Julieanne Kost - 1:58 PM on January 4, 2011   Reply

    I just tested it again and it works for me if I follow the steps above. Are you on Mac or Windows? (Note the type layer will be named “Filename” but the actual name of the file will appear in the image area.)

  • By Ben Elliott - 9:40 AM on November 8, 2011   Reply

    Can you give any indication how to automate the position of the inserted file name text layer?

    • By Julieanne Kost - 9:35 AM on November 11, 2011   Reply

      When you are recording the action, you can use the Move tool or Free Transform to reposition the type. You can also use any of the options in the Options bar to make changes to the type such as change the font or size – but if you make changes to the Type tool’s options, you need to remember to only select the Type layer and make changes, don’t select the individual characters of the type.

      • By Ben Elliott - 12:07 AM on November 12, 2011   Reply

        Many thanks. I’m still coming to grips with “actions”

  • By Vincent MacNamara - 4:52 AM on March 15, 2012   Reply

    I’m experiencing a problem trying to incorporate this into an action. I double click the text layer to change the font size and colour in the options bar, but I’m getting the filename of the image used to create the action every time I do this. I can move the layer ok without it changing, but one I attempt to edit the font it changes. Am I missing something, or is it possible to edit the script to use the font, colour and position I want?

    • By Julieanne Kost - 10:17 AM on March 15, 2012   Reply

      Dont double click the text layer. Just click the text layer to select it, select the type tool and change the font etc in the options bar.

  • By Marilyn - 8:01 AM on March 26, 2012   Reply

    I want to batch a bunch of files using the script so I recorded an action to change the font, size, postion, etc. however when I run the batch, it puts the same file name that I used to create the action on all of my files. How can I get it to add the correct filename?

    • By Julieanne Kost - 6:16 PM on March 27, 2012   Reply

      You can make any changes to the text if you select the type tool and make the changes in the Options bar. If you select the type in the image area using the text tool, then you will only get the first name that you changed when recording the script.

      • By Marilyn - 8:03 AM on March 29, 2012   Reply

        YESSSSSSSSSS! It worked this time. I was highlighting the text and changing it in the options bar instead of leaving the text unhighlighted. This is going to save me alot of time and headaches. Thank you a bunch!!!

  • By chloe - 12:19 PM on April 25, 2012   Reply

    thank you so much for these instructions & script! It took me a bit of time to figure out NOT to double-click the type layer, but I finally got my action to work. I love love love batches and watching my computer work for me while I sit back and relax ;)

  • By Brian - 1:31 PM on August 13, 2012   Reply

    Any suggestion for special characters like dashes?

  • By Ekaterina - 2:15 AM on September 4, 2012   Reply

    Is there any script that would add text layers with PS layers titles?

  • By Mike Santistevan - 6:24 PM on December 18, 2012   Reply

    Julianne, once more your in-depth knowledge of this tool has saved me hours of manual work not to mention made it impossible for me to enter a typo. And thanks to Thomas for writing such a handy script!!

  • By James Pyle - 11:09 PM on May 15, 2013   Reply

    I was very exited to find this because it was going to save me much time, the issue is every time it adds the text it is random sizes in each image..so all my images end up with different results after running a batch.

    • By Julieanne Kost - 8:40 AM on May 16, 2013   Reply

      Are you sure that it’s the text size that is changing? I have a feeling that the images that you are running the script on are different sizes.

ADD A COMMENT