Skip to main content
Participant
November 24, 2023
Question

could not complete the action, since the destination folder does not exist

  • November 24, 2023
  • 2 replies
  • 1297 views

Help! I have hundreds of 5-6mb of PNGs which I need to compress down to under 1mb but every time I try to run the action using script or batch via automation it displays the error message above. I also need to retain the transparent background too, so I need them to stay as PNGs. Does anyone know how to resolve these issues? I have tried renaming the files, changing the location and rebooting.

 

I am using MacBook Pro which is up to date, and also using Photoshop 2023, 2.5.1 release. 

 

Thanks.

 

 

This topic has been closed for replies.

2 replies

PedroMacro
Participating Frequently
November 24, 2023

Try using this script instead of using a action step to do the saving. It will create a folder named "Resized" in the original path of the file, and then save the file in PNG with the current document dimensions and name.

// Check if a document is open
if (app.documents.length > 0) {
    // Set the active document
    var doc = app.activeDocument;

    // Get the original file path
    var originalPath = doc.path;

    // Create the "Resized" folder within the original file's location
    var resizedFolder = new Folder(originalPath + "/Resized");
    if (!resizedFolder.exists) {
        resizedFolder.create();
    }

    // Define the output PNG file name (keeping the same name as the original file)
    var outputFileName = doc.name.replace(/\.[^\.]+$/, "") + ".png";

    // Define the full path of the output file
    var outputPath = resizedFolder + "/" + outputFileName;

    // Save the document as a PNG file in the "Resized" folder
    doc.saveAs(new File(outputPath), new PNGSaveOptions());
}

 

Known Participant
May 24, 2024

i swear this suite is getting worse , yet im still paying for it 

 

Stephen Marsh
Community Expert
Community Expert
November 24, 2023

Perhaps it would help to illustrate your problem with a screenshot of the action panel with any save or export step expanded and wide enough to be fully visible. Also a screenshot of the batch or other settings too.