Skip to main content
New Participant
September 17, 2015
Question

Action to save as Jpeg in origin image folder

  • September 17, 2015
  • 5 replies
  • 11270 views

Hello everybody,

I tried to create an action to save as Jpeg but i have a problem.

I open an image, for example in "E:\folder1\"

I play action and surprise Photoshop don't save my image in "E:\folder1\" but save it in the last folder's image i save !

How i can modify action to save image in the same folder where it is originally ?

Thank you to help me and sorry for my very bad english...

This topic has been closed for replies.

5 replies

New Participant
November 8, 2023

I finally made it happened somehow by: 

- Using Cmd + E to fusion all the layers so you have only one layer
- Mode > Indexed Colors (so it become locked again)

- Then using the simple Cmd + S (save) 

One time it tried to ask me to save in the Adobe cloud... then I said no I put my computer. So it didn't work

The second time it just saved the damn file. So this time it's using it's actual path. 

Charles91
Known Participant
February 25, 2023

Hi there, 

Quite difficult to follow. 

At the end, what would be the script that I can integrate into my action that will allow the img to be saved in the same folder as the original (re-place the orginial) ?

Thanks

-CC

Stephen Marsh
Community Expert
Community Expert
February 25, 2023
quote

Hi there, 

Quite difficult to follow. 

At the end, what would be the script that I can integrate into my action that will allow the img to be saved in the same folder as the original (re-place the orginial) ?

Thanks

-CC


By @Charles91

 

The thread is eight years old and has many posts on side topics, so it is unclear which bit is difficult to follow.

 

For example, there is a Preference > File Handling setting to save to the same folder as the original, so no script is required. For scripting, in order to save into the same folder as the original, the file format and file saving options also need to be included.

 

Perhaps starting a new topic and clearly spelling out the situation, desired outcome and challenges would help to bring clarity to your situation.

 

 

Charles91
Known Participant
February 27, 2023

thanks for answering Stephen_A_MArsh,

 

I found that I'm not the only one having the issue of saving to orginal folder.

https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-a-copy-not-saving-file-to-original-folder-in-photoshop-problem-or-error/td-p/12074791

Even if in preferences > File Handling is set to "save as to original folder", and "save as to legacy" is cheked, and like some suggest, image preview is set to "Always save".

 

So I'm looking for a script to bypass this bug.

 

-CC

 

Inspiring
January 25, 2023

have you tried just using the (included) Image Processor script?

 

under the File menu > Scripts > Image Processor

 

you tell it which image(s) or folder to process, and you can specify the destination folder (I usually pick the same folder as the original)

 

You can save images as JPEG, PSD _and_ TIFF, all at the same time! Each image type goes into its own folder.

 

You also have the ability to run an action from the Actions panel on all the images.

Kevin Stohlmeyer
Community Expert
Community Expert
January 25, 2023

Have you checked your preferences/file handling and checked "Use Legacy Save As" - this has messed up many a script with the new save protocols. Checking this resolves it.

JJMack
Community Expert
Community Expert
September 17, 2015

Try recording the "Save As" step and not change anything in the save as dialog except the File Type. Only use the file type pull-down menu to select Jpeg.  If you change the Path, Filename, etc fields those changes will be recorded in the action step.  You must record the action on a document that has been save so the document has a backing file. So there will be a default Path and  file name.  When you do not change fields in a "Save As" steps dialog like path and filen ame nothing will be recorded for these settings in that action step.  When that step is played Photoshop will use the current document Path and File Name.  So the action will only work on documents the have a backing file on disk.  It will not wok on new document that have not been saved.  New documents do not have a backing file till they have been saved.  You can also use menu File>Automate>Batch  and uset it override save as steps option to overide  Save As steps settings.

This question should be in the Photoshop General Discussion forum.

Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.
Contains

Example
Download

JJMack
New Participant
September 17, 2015

Hi, Thanks for you quick response.

I tried recording without change file destination but Path is automatically save by Photoshop :-(

Participating Frequently
December 20, 2015

Bonjour

With this :

var saveFile = new File(activeDocument.path);

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


Thanks for the answer,

Being a beginner in scripting, I only know how to create one via the photoshop script panel.

How is it possible to edit the script to insert your commands ?