Skip to main content
Participant
July 15, 2016
Answered

Save an open file as PSD in current folder without prompt?

  • July 15, 2016
  • 3 replies
  • 3119 views

I'm trying to find a way to save an open file as a PSD (from JPG) in it's current folder without prompting me.  It seems like it should be so simple.  I'm using CC 2014.  Using the Image Processor would work but it creates a new PSD folder.  (I tried editing the imageprocessor.jsx to remove the path but it didn't work.... maybe because I tried running the jsx from my desktop instead of the script folder?  I don't have access to modify the original sadly.) 

So yeah, just trying to make an action that does stuff and then saves it without needing any interaction.   The closest thing I've found is this script, that does everything I want EXCEPT the active document remains a JPG, instead of becoming the new PSD.  so I end up having to save it anyways or open the new PSD from the folder to continue editing.  

Save copy as PSD

var doc = app.activeDocument; 

var Path = doc.path; 

var Name = doc.name.replace(/\.[^\.]+$/, '');  

var Suffix = "-Copy"; 

var saveFile = File(Path + "/" + Name + ".psd"); 

SavePSD(saveFile, 8); 

 

function SavePSD(saveFile){

          psdSaveOptions = new PhotoshopSaveOptions();

          psdSaveOptions.embedColorProfile = true;

         psdSaveOptions.alphaChannels = true;

         activeDocument.saveAs(saveFile, psdSaveOptions, true,

Extension.LOWERCASE);

}

Thank you!

This topic has been closed for replies.
Correct answer SuperMerlin

Change

activeDocument.saveAs(saveFile, psdSaveOptions, true,Extension.LOWERCASE);

To

activeDocument.saveAs(saveFile, psdSaveOptions, false,Extension.LOWERCASE);

3 replies

cc8289164Author
Participant
July 16, 2016

I was so close!   Thanks for your help. 

SuperMerlin
SuperMerlinCorrect answer
Inspiring
July 15, 2016

Change

activeDocument.saveAs(saveFile, psdSaveOptions, true,Extension.LOWERCASE);

To

activeDocument.saveAs(saveFile, psdSaveOptions, false,Extension.LOWERCASE);

JJMack
Community Expert
Community Expert
July 15, 2016

The thing is the Image Processor Script is not a plug-in it will always display its dialog.   However, the Image Processor pro is a Plug-in script.  So you can do want you want by recording a single step Acton that uses the Image Processor Pro Script plug-in.

Download and Install Image Processor pro.

Open a jpeg file in Photoshop.  With the  Document open in Photoshop.   Record this one step action.

Setp 1 menu File>Automate>Image Processor Pro...

in its dialog use settings like this you may want to use 8bit not 16bit for the original jpeg file is 8bit color for jpeg file format does not support 16bit color.

The Plug-in will record the setting used recording the action into the actions step.  The the Action is played the Plug-in will bypass displaying its dialog and uses the setting passed by the Action player.  If you plat the action more that once for a Jpeg document the document name will have a sequence suffix to make each PSD unique.

Warning the Action step will look empty in the action. It is not the Action palette just does not display what the plug-in recorded.

I also do not know if you uncheck keep original would overwrite the saved PSD file if you play the action more than once on a document.  I never tried. Perhaps X will chime in.

JJMack
cc8289164Author
Participant
July 16, 2016

JJMack​  Wow Thanks for the info!  I'll be sure to try it out