• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Batch action adding unwanted number to filename

Community Expert ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

I have a folder of EPS files i need to rasterize to 300 ppi PNG, 300 ppi JPG, 72 ppi PNG, and 72 ppi JPEG. I made four actions, each of which opens the EPS file at the appropriate resolution then saves in the appropriate format. I am using File > Automate > Batch to convert the files, running the command four times. once for each action. I am using the File Naming feature to add the resolution to the converted file. My dialogue looks like this…

Screen Shot 2016-11-24 at 3.53.08 PM.png

When the action is run I expect to see Logo_Black.eps convert to Logo_Black300.png, and so on. This is not happening. Each converted file has a number added after the filename but before the added resolution. In other words, Logo_Black300.png is saved as Logo+Black3300.png. All converted files have the 3 added to them. The next time I run the action, for 300 ppi JPG images, I get Logo_Black4300.jpg, etc. Photoshop is adding an unwanted digit and incrementing it whenever the action is run.

It's not a serial number, because I am not using the feature and it is not incrementing for each file, just each batch operation. I have to run this on EPS 12 files, producing 48 images. I have to do this for 110 logos. Over 5000 files to rename. I would appreciate it if I didn’t have to do that.

[Moved from non-technical Forum Lounge to Photoshop Scripting forum... Mod]

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

TOPICS
Actions and scripting

Views

831

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Nov 24, 2016 Nov 24, 2016

Copy link to clipboard

Copied

Changing the DPI resolution does not change the number of pixels on the image. You seem to be trying to create Print size image with a 300dpi resolution and also create web size image with 72 dpi resolution.  The things is resolution is meaningless on the web.  Displays are run at a single ppi resolution.  What is important is the number of pixels an image has.  You need to resize your image for the web to fit within some pixel dimension like 600px by 300px.  That is where Photoshop Plug-in Fis Image came in handy for.  There is also Adobe Script Image processor that also uses Fit Image.  I prefer using a Plug-in you can download from the Web called Image Processor Pro...  once installed you will see it in menu File>Automate>Image Processor Pro...

Batch and the Image Processors can also be usen from the bridge using bridge menu Tools>...

The Image processors can include action you create in their processing.  It would easy to add watermarks for the image correctly sized for your different sizes with Action you create.

If you use the image processors on the same set of file more the once the output file will not be overlaid. Serial numbers will be added if the output file exists. The image Processors only save new files.

Capture.jpg.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

You have misunderstood my question. The resolution of the image is fine. The names that the batch action is generating are not. An unwanted digit is added to the filenames the batch action creates.

However, this Image Processor Pro intrigues me. I do not have it in my version of Photoshop. Is this a plug-in?

2017 release on Mac OS Sierra.

Screen Shot 2016-11-25 at 9.12.09 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 25, 2016 Nov 25, 2016

Copy link to clipboard

Copied

No its a free download  ps-scripts download | SourceForge.net

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2016 Nov 27, 2016

Copy link to clipboard

Copied

LATEST

You mention:

Each converted file has a number added after the filename but before the added resolution. In other words, Logo_Black300.png is saved as Logo+Black3300.png. All converted files have the 3 added to them. The next time I run the action, for 300 ppi JPG images, I get Logo_Black4300.jpg, etc. Photoshop is adding an unwanted digit and incrementing it whenever the action is run.

I can’t recreate this in CC2015.5.1

It is obviously best to try to fix this at the source, so that the batch generated files have the correct name.

If you have a lot of images processed or you can’t fix this at the source, then a last resort option could be to use Adobe Bridge’s Tools/Batch Rename feature.

Using a string substitution with regular expression, it is possible to remove the first digit after the last alphabetical letter, such as:

(?<=\D)\d

A screenshot below:

rename.png

This regex only helps for a single “extra” digit, so be careful if using on a large batch that may contain two or more errant numbers.

Good luck!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines