Skip to main content
Participating Frequently
May 19, 2024
Question

Inserted menu item ‘Save as’ in action, opens different folder

  • May 19, 2024
  • 2 replies
  • 698 views

When I do a manual 'save as' , the dialogue box opens to where the psd was originally opened from as expected.. 

however , when I run an action containing the step 'save as' (as an inserted menu item) , it opens the last folder used ..

Ive tried all the usual resetting pref etc , and both 'save to original file' and 'legacy save' are both checked .. 

i just don't understand why ctrl+sh+s should behave differently to the 'save as' step in an action ?

 

This topic has been closed for replies.

2 replies

Stephen Marsh
Community Expert
May 19, 2024

@CanvasHut 

 

I can't reproduce this result. I tested on an Intel Mac with Ps 25.7.0, File Handling Prefs set to "Save As to Original Folder" and "Legacy Save As" and got the same result from manually running Save As vs. Save As inserted into an action. If the open file has a backing path (i.e. has been previously saved), the default Save As location is to the same directory as the open file for both methods. EDIT: For a new unsaved file, the last Save As location in that session is remembered.

CanvasHutAuthor
Participating Frequently
May 19, 2024

Thanks for reply , I'm on Ps 25.7 too but windows version .. ive tested on version 20.0.9 of ps and there's no issue there so 🤷🏻‍♂ 

Stephen Marsh
Community Expert
May 20, 2024

oh ok yes , so such script a could 'save as' to original folder ?
That's all I need it to do , (and with the original file name in the file field)

Thanks



@CanvasHut wrote:

oh ok yes , so such script a could 'save as' to original folder ?
That's all I need it to do , (and with the original file name in the file field)

Thanks


 

You can try this:

 

#target photoshop

function s2t(s) {
    return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
try {
    var docPath = app.activeDocument.path;
} catch (e) {
    var docPath = '~/Desktop';
}
var docName = app.activeDocument.name.replace(/\.[^\.]+$/, '');
descriptor.putObject(s2t("as"), s2t("photoshop35Format"), descriptor);
descriptor.putPath(s2t("in"), new File(docPath + '/' + docName));
descriptor.putBoolean(s2t("lowerCase"), true);
executeAction(s2t("save"), descriptor, DialogModes.ALL);

 

Instructions for saving the code and use:

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

c.pfaffenbichler
Community Expert
May 19, 2024

Could you please post screenshots with the pertinent Panels (Toolbar, Layers, Actions, Options Bar, …) visible and the Action fully expanded

CanvasHutAuthor
Participating Frequently
May 19, 2024

Hey thanks , but there's nothing of interest to show in a screenshot everything normal and the save action doesn't expand as it's a menu command inserted (I have it at the start of every print action as I want to save the psd in case ps crashes on print , which is another issue in another thread 😆 )