How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps

How to Remove Sequence Numbers and Empty Spaces When Exporting Layers and Layer Comps

One of many cool options in Photoshop is to export layers and layer comps as files. You can run both scripts from File > Scripts sub-menu. After exporting and saving files you will have what you want with one small cosmetic problem: each of exported files will have a sequence number in front of the file name. Another less cosmetic problem are empty spaces in the name of exported file due to layer/layer comp name. You can solve both problems from Adobe Bridge using Batch Rename > String Substitution option. I will give you exact instructions how to do remove a sequence number at the beginning of the file name and to remove or substitute empty spaces with underscore.

How to remove a sequence number at the beginning of the file name using Adobe Bridge

First of all, let me mention two practical examples in case anyone who is reading this post has doubt why in the World to export each individual layer or layer comp. Certainly web designers won't ask that question. You may have, for example, PSD template with photo edges, frames or textures which can be exported and used with Edge FX Pro and Adobe Textures Pro. In a recent post I am pointing to that option with layer comps for customers who own some of my products with edges. And there are many free PSD templates posted on this blog with layer comps.

Note that you can use Generator to export and save the files you need and to skip sequence numbers in front of the exported file name. Empty spaces, if present, can be handled in Photoshop.

Anyway, you have exported files and you have sequence numbers at the beginning of the file name. There are and dashes which you want to remove. Here is a precise instruction:


  1. Run Adobe Bridge and navigate to the folder with exported files.
  2. Select all files which have sequence numbers.
  3. Go to Tools > Batch Rename.
  4. Choose: String Substitution from the first drop-down list in New Filenames section. From the second drop-down choose: Original Filename. In the Find: text field type: _\d{4}_ (underscore, backslash, letter d, open bracket, number four, closed bracket, underscore). Leave Replace with: text field blank. Ensure that you have Replace All and Use Regular Expression checked as shown on the screenshot below.
  5. Click on the Preview button in the top right corner and ensure that files will be renamed as you want.
  6. Click on Rename button and you are done.
Batch rename dialog with options to remove sequence numbers


In case you are first time doing this and you still have doubts if everything will work as expected, check Copy to other folder option when renaming files. This option is located near the top left corner under: Destination Folder.
Destination folder option

Another thing I want to mention is to remove everything that you have below String Substitution options. In case you see additional renaming options just click on minus (-) sign on the right side to remove them.
Remove options below string substitution

How to remove/substitute empty spaces in the file name using Adobe Bridge

It is pretty similar process. The only difference is that you should type: \s (backslash followed with letter s) in the Find: text field. You can leave Replace with: text field blank or to type underscore.
Remove empty spaces from the file name

More solutions

In case you want to remove all numbers from the file name type: \d? (backslash, letter d, question mark) in the Find: text field. Lastly, there is a solution described on Adobe Forums how to remove zeroes from the file name in batch renaming process.


Product used in this tutorial:
Adobe Bridge CC

Reference:
Creative Suite / Automate tasks in Adobe Bridge

Comments

Popular posts from this blog

How to Change Artboard Size in Adobe Photoshop

Free Puzzle Pieces Actions For Photoshop and Elements

Old Weathered Vertical Wooden Planks Free Image