Skip to main content
Participating Frequently
Nov 23, 2025 4:56 PM UTC
Answered

Image processor replaces characters in file names

I'm using Image processor to batch convert eps files to psd in Photoshop 2026 Mac.

My files have an asterisk (*) in their names, but they get replaced by underscores (_) in the exported files.

Is there a way to prevent this (unwanted) substitution?

Stephen Marsh
Stephen MarshCorrect answer
Community Expert
Nov 24, 2025 9:55 PM UTC
quote

Thank you @Stephen Marsh, that worked.

Any idea? 


By @philippeg6226457

 

Simply comment out by adding 2 forward slashes or delete the entire filename find/replace regular expression as below:

 

865941i84B22402663C20E9.png

 

The result:

 

865942i1183324304FD3776.png

10 replies

Stephen Marsh
Community Expert
Community Expert
Nov 23, 2025 9:15 PM UTC

@philippeg6226457 

 

Quit Photoshop. Edit the following file in the Photoshop app/program folder:

 

...\\Presets\\Scripts\\Image Processor.jsx

 

You need to remove the \\* characters as in the following screenshot:

 

865707i2587FB18FEA93204.png

Translate
Participating Frequently
Nov 24, 2025 4:49 PM UTC

Thank you @Stephen Marsh, that worked.

And thank you @J E L for your advices.

I still have another filename issue though: some of my filenames include a slash (/).

I know it is bad 🙂 but it works on Mac and we need them for this specific project.

Here's what I did:

• Original line 1871: 

inFileName = inFileName.replace(/[:\/\\*\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'

• Modified for asterisk (ok):

inFileName = inFileName.replace(/[:\/\\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'

(why these two escape backslashes?)

• Modified for slash (not ok):

inFileName = inFileName.replace(/[:\\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'

 • This doesn't work either:

inFileName = inFileName.replace(/[:\?\"\<\>\|]/g, "_");  // '/\:*?"<>|' -> '_'

Any idea? 

Translate
Legend
Nov 24, 2025 5:40 PM UTC

Forward slash is not legal in a Mac filename, that is the directory (folder) delimiter. "/Users/username/Desktop/foo.jpg"

With Extendscript, forward slash is treated as a backslash for cross-platform compatibility so the same script works on both Mac and Windows.

Translate
J E L
Community Expert
Community Expert
Nov 23, 2025 5:57 PM UTC

Hi @philippeg6226457, it's probably because it's running into non-standard characters in filenames with the Image Processor.jsx script used to process the files. You could write or search for a script that modifies the Image Processor script to handle special characters. Also, you might explore using Adobe Bridge before or after to batch rename files: select the EPS (or PSD) files, go to Tools > Batch Rename, and use “String Substitution” to replace * with - or remove it. Others here may have more ideas!

Translate