Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

Mantain the same name with whitespace

$
0
0

I'm trying to make some batch operations on images. All works great, but I noticed that the image name are changed.

 

When I save my image, if the name contains space, photoshop automatically convert this whitespace to "-". I want preserve my image name, because I have those informations stored in the database and after the change name I cannot find the correct path of the image.

 

For example an image called "Google Analytics.png" become "Google-Analytics.png" but I DON'T want that extra "-".

 

This is my script routine:

 

 

function SavePNG(saveFile){    var file = new File(saveFile);    var pngOpts = new ExportOptionsSaveForWeb;     pngOpts.format = SaveDocumentType.PNG    pngOpts.PNG8 = false;     pngOpts.transparency = false;     pngOpts.interlaced = false;     pngOpts.quality = 100;    app.activeDocument.exportDocument(file,ExportType.SAVEFORWEB,pngOpts); 
}

Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>