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

Create an Action which saves images to same directory?

Engaged ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

I have several folders of  TIFF images.  I need to process them individually, then save them as JPG in the same folder the original TIF was in.

I  created an action with provides several of the final steps I need, including the "Save As".  I clicked the "modal" option for the "save as" step, so I can edit the name as need be before saving.

My problem is the action "remembers" the directory path in which the action was created (i.e. the first folder).  When I run the action on images I've opened from other folders, it defaults to the first folder.  So I need to navigate to the current folder every time.  This is a pain.

How can I just have the action open the save as dialog to the same directory as the currently open image?

Views

30.3K

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
Guest
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

You could use File.Automate>Batch

.

Set the source folder to the folder with your images.

Set the destination folder to any folder (does not matter in this case)

Check the Override Action "Save As" Commands box.

Under Play, choose your action with the save step.

With the enable dialog checked in the save step in your action,

using batch should open the Save As dialog in the source folder.

resize-and-save-dialog-enab.png

batch-to-samefolder.png

If you would rather open all your images first, instead of one at a time,  you can set

the source to opened files.

If you do it this way, it's probably a good idea only have the images that you want to

process open. (i.e. images from the same folder)

batchopenedfiles.png

MTSTUNER

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 ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Yes, I knew of those ways. But I was trying to create a portable action

wherein anyone could simply run it on an opened file to prompt for saving,

BUT default to the directory the opened file was in (rather than the one in

which the action was created.

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
Guest
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Well it would have helped if you had said that in the first place.

You might be able to do something like that with scripts.

http://forums.adobe.com/community/photoshop/photoshop_scripting

MTSTUNER

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 ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

I thought it ws pretty clear.

Anyhow, I guess the short answer is Photoshop can't do this, without resorting to scripting.  Oh well.

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
Mentor ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Edited: Just reread your post. Process them individually and save. Then run another action to convert them to JPG where they sit.

Just use save and close as your destination. You can have the action just be a save as jpg from any random open image, with any random destination (while recording the action). If you'd like to optimize your JPGs, record a step before the save step that sets your prefs to not include thumbnails and icons. Then after the save step record another step that sets your pref back.

Setting your metadata to null seems more problematic. Maybe someone has some hints for that.

jeg_test.jpg

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 ,
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

Yes, these tips are all valid -- when using the batch dialog. When I use that dialog, I have used these methods.  I was just womdering about an action that is run without opening the batch dialog, like on a single image. For example, at any point i might have an image I need to perform a series of steps and then save it as a JPG quality 8.  But I want to decide at run-time what to name it and where to save it.

As you can see here, the regular action palette has the path to save the file in it:

Screen shot 2010-08-25 at 4.28.17 PM.png

What I was seeking is a way to NOT have that saved as part of the action; I only wanted to record the format and quality saved in the action. While I can use this action to ultimately choose any location I wish, I always START in the hard-coded directory and need to navigate to where the image was opened from.

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
Guest
Aug 25, 2010 Aug 25, 2010

Copy link to clipboard

Copied

You didn't say which version of photoshop your using,

but in cs5, under preferences>file handling,  there's an

option for save as to the same place as the file came from.

MTSTUNER

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 ,
Sep 25, 2021 Sep 25, 2021

Copy link to clipboard

Copied

What is wrong with using a free script that you do not need  to write that was created to process your files. All you need to do is create the collection of  tiff files you want to convert in the bridge then use bridge menu tools>Photoshop>Image Rrocessor Pro... then when Photoshop opens the Image Processir Pro dialog you fill in the options to save jpeg files in the same foldets as the source tiff files at  the Jpeg quality you want  in the color space you want?

Capture.jpg

JJMack

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
Participant ,
Apr 27, 2019 Apr 27, 2019

Copy link to clipboard

Copied

The best answer that I've found is to set the action to save, to say, a folder on your desktop called "Edit" and then move all of the  images you create in the edits folder out, to where they are to be stored when you've finished the set. Only efficient for working on big sets of photos. If I'm just doing one or two then better to save as in the default path folder.

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 Beginner ,
Sep 25, 2021 Sep 25, 2021

Copy link to clipboard

Copied

This is a pain. I too just want it to save in current folder.

 

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 ,
Sep 25, 2021 Sep 25, 2021

Copy link to clipboard

Copied

@Nodnarbius 

 

Nothing has really changed in the 10+ years since this topic was created regarding actions and your request, so off the top of my head your options are:

 

1) A custom script

 

2) Download and install the Image Processor Pro script and record it into an action, as this does allow saving into the source folder or a subfolder of the source.

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 ,
Sep 25, 2021 Sep 25, 2021

Copy link to clipboard

Copied

This example script uses Export/Save for Web (Legacy) to save a JPEG at 90% quality:

 

/* This script exports a Save for Web JPEG to the open doc source folder */

#target photoshop

if (app.activeDocument.path) {
    // Remove extension and replace any leading or trailing spaces
    var docName = app.activeDocument.name.replace(/\.[^\.]+$/, '').replace(/^ +| +$/g, '');
    // var docNameInput = prompt('Enter a filename (without extension):', docName);
    // Remove extension
    // var docNameOutput = docNameInput.replace(/\.[^\.]+$/, '');
    var docSourcePath = app.activeDocument.path.fsName;
    // var docPath = Folder.selectDialog('Select a folder to save the JPEG image to...');
    // File Path & Naming
    var saveFileJPEG = new File(docSourcePath + '/' + docName + '.jpg');
    // Conditional overwrite check
    if (saveFileJPEG.exists) {
        // true = 'No' as default active button
        if (!confirm("File exists, overwrite: Yes or No?", true))
            // throw alert("Script cancelled!");
            throw null;
    }
    SaveForWeb(saveFileJPEG);
    app.beep();
    // alert('JPEG saved!');

    function SaveForWeb(saveFileJPEG) {
        var sfwOptions = new ExportOptionsSaveForWeb();
        sfwOptions.format = SaveDocumentType.JPEG;
        sfwOptions.includeProfile = true;
        sfwOptions.interlaced = 0;
        sfwOptions.optimized = true;
        sfwOptions.quality = 90;
        app.activeDocument.exportDocument(saveFileJPEG, ExportType.SAVEFORWEB, sfwOptions);
    }
} else {
    alert("The image must be open and saved before running this script!");
}

 

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

 

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 ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

Figured it out 🙂 Been bugging me for ever on this.  I Always need to save a psd (rgb) then a Tiff for print CMYK in same folder and always have an issue of it not saving the tiff in the folder always remembering the folder I created the action with.  Here is my fix: 

 

***Create a temp folder on your server (see the end its not the same as other fixs, to some it up you will delete this folder after you create the action)

In photoshop creat an action - Save file (save as psd with layers):Flatten image:Change to CMYK: file save as Tiff - Save as copy - Save to Temp folder you created on server or where ever you saved it: History state back2 or 3 (so you have your layers again to make further edits if needed): can save again as psd but not needed.  STOP ACTION: Make sure action is prompted to show options on second save. 

 

DELETE TEMP Folder - Doing this we make it default back to last save folder - PResto!


Run 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
Community Beginner ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

I have found this also works ...

 

Duplicate the file, then record an action using File > Save (Not SAVE AS!!!)

Stop the action you are done - put whatever steps you want before and after the action

Make sure the Toggle Dialog is on in the action for the Save step.

 

When you use Save As it will target the recorded folder, when you use Save it targets the current folder unless the toggle dialog is set to off and then it targets the folder used to create the action.  When you look at the steps in the action the detail looks the same ... 😉

 

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
Explorer ,
Sep 29, 2023 Sep 29, 2023

Copy link to clipboard

Copied

Thanks so much Darkroomdevil - I had been tearing my hair out over this! 🤯 Doing as you suggested and toggling the Save step worked for me!  🤩

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 ,
Apr 16, 2024 Apr 16, 2024

Copy link to clipboard

Copied

LATEST

@Darkroomdevil is a genius!!!

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