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

PSD action file save location issues - Please Help

New Here ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

I created a psd action that will finalize my design file, save/export numerous file types (with unique naming for each file) within existing labeled folders/subfolders all in one shot.

 

I put together a folder structure which has the labeled folder/subfolders for the psd action to save/export the files to. I labeled this folder as "client". So before I run the psd action, I drag my premade "client" folder to my desktop. Once that "client" folder is on my desktop, I run the psd action I created and it runs flawlessly. Once the action is complete, the "client" folder on my desktop will be populated with the labeled file exports organized in the correct sub folders.

 

Here's the problem I'm running into ... I work with a team of graphic designers. I created this action to speed up our final files procedure. The action works great on my computer, but I will not be the only one running this psd action. I will have a multiple designers running this action on their own computers. When I run the action on someone else's computer it no longer works. And I know this is because when I run the action on my computer, photoshop knows to save everything to the "client" folder on my desktop. When it runs on someone else's computer, I'm assuming it's looking for the "client" folder specifically on my computer desktop and not the other computer. And when it can't find that specific location I'm sure it causes the action to fail?

 

Did some research, sounds like if you're creating a psd action to save/export files, it uses an absolute location. aka, the save/export action will only work on my computer. I read that I may be able to override the save location by converting my psd action to a script, manually editing the code within the script for the save location, then running that script in photoshop?

 

I'm a graphic designer with minimal code knowledge. It would be greatly appreciated if someone could point me in the right direction or help me figure this out. I would love to be able to run this psd action on multiple different computers without any issues. It doesn't matter to me where the "client" folder save location is, I just used my desktop when I created the psd action because I figured it was the most generic location.

 

Myself and my team are Mac based.

 

Thanks so much.

TOPICS
Actions and scripting , macOS

Views

322

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

If you include a Save step in an action it has to save somewhere. That's pretty self-evident.

 

But you can make it save back to whatever folder it came from, unspecified, if you make sure that the save path is not highlighted in the dialog when you record the action. If it is, the absolute path is recorded.

 

To un-highlight the path, it is usually enough to click away from the folder and back again.

 

Or you can drop the save step and just leave the file open, and people can save it wherever they want.

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
New Here ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

I appreciate the feedback! I defintiely don't want to drop the save steps, eliminating the save steps is the main focus of the psd action. To put things into perspective, the action runs through 16 different exports/saves. So the action will save us a decent amount of time if everything is able to be saved/exported with the click of a button rather than saving to a specific location for each of the 16 files.

 

I guess I'm really just curious if there's a save location I can use for the action that will work on my computer along with any other computer that runs the action.  I can give your recommendation a shot "make sure that the save path is not highlighted in the dialog when you record the action" Thanks again for your response, it's greatly appreciated. I'll get back to you once I'm able to give this a try.

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
Engaged ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

to do what you ask you need a specific script, with actions what you ask is not possible, because the path of the user who created the action is stored in the action.

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
LEGEND ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Or you could script JUST the save step when needed. Its going to be tricky, actions weren't really designed for complex operations.

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
Engaged ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

you could convert the action to jsx script and modify it so that it works on all computers.

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

quote

I read that I may be able to override the save location by converting my psd action to a script, manually editing the code within the script for the save location, then running that script in photoshop?


By @joshua_watkins

 

Download the entire xtools repo to your computer as a .zip file, then decompress:

 

https://sourceforge.net/projects/ps-scripts/files/xtools/v2.3/

 

You can then use File > Scripts > Browse:

 

...xtools v2.3/apps/ActionFileToJavascript.jsx

 

or

 

...xtools v2.3/apps/ActionToJavascript.jsx

 

Then using a plain text editor, you can then perform a multiple find/replace to edit the JSX file from the original Desktop/client folder path to the active user account ~

 

"~/Desktop/client"

 

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

I should also mention that this should be easier with UXP scripting, as Photoshop 23.5 > can convert the action to batchPlay code for use as a .psjs as a built-in feature (if developer mode is enabled in prefs). Then all you need to do is bulk update the paths in the code with a plain text editor.

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
Engaged ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

Unfortunately Stefano this isn't the case, in uxp you have to create one or more session tokens and it's not easy, I too found it difficult to do it and I've been studying uxp for a while, for a beginner I don't think it's possible.

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

@Ciccillotto 

 

UXP standalone .psjs scripts are different and simpler than panels. Or do you mean the whole thing about writing to disk?

 

You are correct, although it's easy to convert the action to batchPlay code and edit the path, it doesn't save. The following UXP example only has 2 steps, invert and save:

 

 

async function test() {
    let result;
    let psAction = require("photoshop").action;

    let command = [
        // Invert
        {"_obj":"invert"},
        // Save
        {"_obj":"save","as":{"_obj":"JPEG","extendedQuality":10,"matteColor":{"_enum":"matteColor","_value":"none"}},"documentID":59,"in":{"_kind":"local","_path":"~/Desktop/client/"},"lowerCase":true}
    ];
    result = await psAction.batchPlay(command, {});
}

async function runModalFunction() {
    await require("photoshop").core.executeAsModal(test, {"commandName": "Action Commands"});
}

await runModalFunction();

 

 

 

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
Engaged ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

From what I know they concern computer permissions, you need tokens, I haven't tried with psjs, but it shouldn't make a difference. If you have time, give it a try, I can't at the moment, I'm at work.

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 ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

quote

From what I know they concern computer permissions, you need tokens, I haven't tried with psjs, but it shouldn't make a difference. If you have time, give it a try, I can't at the moment, I'm at work.


By @Ciccillotto

 

Time to read up, I forgot about such "simple things" in ExtendScript being different in UXP:

 

https://developer.adobe.com/photoshop/uxp/2022/scripting/samples/#access-the-local-filesystem

 

https://forums.creativeclouddeveloper.com/t/i-want-to-export-a-file-in-png-format-do-you-have-a-samp...

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
Engaged ,
Mar 06, 2024 Mar 06, 2024

Copy link to clipboard

Copied

LATEST

From what I know you have permissions to save in the temporary folder and in the plugin folder, to save in other places you need permissions and tokens.

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