ExtendScript: Could not perform the Action, because the destination folder does not exist

"Adobe Photoshop (CS 6 on mac): use Extendscript (below) to convert in a .png .psd file size.

"Save for web error: could not perform the Action, because the destination folder does not exist. Can anyone help?

I am trying to convert the image size of a record of entry into an output folder:

#target 'photoshop '.

var outputWidth = 1024;

var inputFolder = Folder.selectDialog ("input file");

var outputFolder = Folder.selectDialog ("output folder");

If (inputFolder! = null & & outputFolder! = null) {}

var file = inputFolder.getFiles ("*.psd");

for (var i = 0; i < files.length; i ++) {}

var file = files [i];

var doc = app.open (leader);

If (doc.width > outputWidth) {}

var height = (doc.height / doc.width) * outputWidth;

doc.resizeImage (outputWidth + "px", size + "px");

}

var options = new ExportOptionsSaveForWeb();

options.format = SaveDocumentType.PNG;

Options. PNG8 = false;

doc.exportDocument (outputFolder, ExportType.SAVEFORWEB, options);

doc. Close (SaveOptions.DONOTSAVECHANGES);

$.writeln('File ' + (i + 1) + "" + files.length + "transformed");

}

}

I added a few comments, I hope this helps...

#target "photoshop"
var outputWidth = 1024;
var inputFolder = Folder.selectDialog("Input folder");
var outputFolder = Folder.selectDialog("Output folder");
var startRulerUnits = preferences.rulerUnits;
//make sure you are working with pixels
preferences.rulerUnits = Units.PIXELS;
if (inputFolder != null && outputFolder != null) {
    var files = inputFolder.getFiles("*.psd");
    for (var i = 0; i < files.length; i++) {
        var file = files[i];
        var doc = app.open(file);
        if (doc.width > outputWidth) {
            var height = (doc.height / doc.width) * outputWidth;
           /*  doc.resizeImage(outputWidth + "px", height + "px"); */
           //only one value is required
            doc.resizeImage(outputWidth, undefined, undefined, ResampleMethod.BICUBICSHARPER);
        }
        var options = new ExportOptionsSaveForWeb();
        options.format = SaveDocumentType.PNG;
        options.PNG8 = false;
        //get the filename without the extension
        var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
        //build up the output file name and path
        var saveFile = File(outputFolder + "/" + Name + ".png");
        //you need to have a full filepath not a folder
        doc.exportDocument(/*outputFolder */saveFile, ExportType.SAVEFORWEB, options);
    doc.close(SaveOptions.DONOTSAVECHANGES);
        $.writeln('File ' + (i + 1) + ' of ' + files.length + ' processed');
    }
//restore ruler units
app.preferences.rulerUnits = startRulerUnits;
}

Tags: Photoshop

Similar Questions

  • Download the destination folder does not

    When I download the files, I put forefox to put them on the desktop. Even if I haven't changed this setting puts them in the temp folder. I tried to reset it several times but nothing has changed. If I download podcasts he always goes in this folder and windows media player starts to play.
    This seems to have started with the last beta version 12.0 forefox
    Any ideas would be appreciated.
    XP pro

    OK, I found the solution for this. Go to tools, options applications. Edit the file in MP3 format to save the file. It worked for me. Good luck.

  • WARNING 1909. Could not create shortcut &#60; filename &#62; .lnk. Check that the destination folder exists and that you can access.

    When I try to install some programs, I get the following message:

    WARNING 1909. Could not create shortcut .lnk. Check that the destination folder exists and that you can access.

    How this issue is resolved?

    I had this same problem trying to update iTunes. I found a solution here:

    http://www.SevenForums.com/general-discussion/189897-warning-1909-cant-create-lnk-due-read-only-setting-problem.html

    by OneRing2Rule

    "When the installation fails and you get the error 1909, stop." DO NOT CLOSE the installation or click a button. Simply open another window, navigate to the data directory of program (C:\Program Data\whatever-the-name-of-the-directory-is C:\Program Apple for installation of iTunes), do a right click and select Properties, clear the read-only attributes at the bottom of the box and apply. Then go back to the installation failed and click Retry. »

  • Lightroom CC 2015.7 / Camera Raw 9.7 / macOS Sierra - could not find the Destination folder during import

    Hello world

    Sorry if this question is stupid, but I always imported files easily on my hard drive. But recently, since I've updated my Lightroom, I can't find the menu destination folder when importing photos.

    I go in the menu library, choose IMPORT, select the original folder, the photos I want to import and then, on the right side, I only see the option 'create an intelligent Preview' and the option of keywords/tags. Where is the part that I could choose the destination folder - and even create subfolders?

    If I click on the triangle in the lower left corner to minimize the menu, I can see the menu "create a subfolder. However, the normal display mode brings no option like that, but by selecting the main folder by clicking on the icon in the corner right-towards the top.

    What Miss me? It seems not very practical for me.

    Cheers in advance!

    The destination tab may have accidentally become hidden, next to one of the other header in the sidebar right and you click right there get a pop up that will allow you to restore it. See the screen capture.

  • Where is the location of the file Outlook.pst in Windows 7, the AppData folder does not appear in the user specific folder?

    original title: where is the location of the Outlook.pst file in Windows 7?

    I want to copy my Outlook.pst to my desktop (Windows XP Pro) data to my laptop.  Outlook displays the outlook.pst file which will be located in the "C:\Users\Specific User\AppData\Local\Microsoft\Outlook" folder on my laptop.  However, when I try to access this folder in Windows Explorer, the AppData folder does not appear in the user specific folder.  I find in my office because Windows XP does not hide it, but he must hide in the Windows 7 operating system on my laptop.  How can I get it so that I can copy the file outlook.pst from my desktop to my laptop?  If the file is hidden, is there an easier way to copy outlook data from one computer to another?

    Chris

    To see AppData, enable the display of hidden files and folders in the Control Panel > Folder Options > view .

  • Have dwnloaded Firefox, but invites to drag in the applications folder does not

    Downloaded Firefox, but invites him to drag the icon to the applications folder does not occur. Please notify. Thank you

    If the disk image file is not opened automatically, then you must open the DMG file yourself.

    Open the Firefox disk image file and drag the Firefox program into the Applications folder on your hard drive.
    Do not double-click the Firefox to run from the disk image, but instead, drag it out of the DMG file.

  • Cannot migrate VM between 5.5 ESXi versions: the version of the product to the destination host does not support one or several CPU features

    We receive an error message that I am trying to make sense. I understand very well the notion of compatibility, CPU, CPUID, masking and so on, after working on a competitor hypervisor. However, this error seems wrong (or needs better wording) based on my understanding:

    Here is the message:

    ----

    A general error occurred: the version of the product to the destination host does not support one or several features of the CPU currently use by the virtual machine.

    Characteristics of CPUID level 0 x 1 'ecx' register are indicated with a '1' bit: x00x:xxx0:xx0x:x 000: x 0 11xx:00: 00xx:11xx

    ----


    This happened during the migration between two hosts ESXi with the same physical processors - in this case, a Westmere X 5650.


    The source host is on ESXi build 2068190 (5.5). The destination host is on ESXi build 1474528.


    The bits it seems to complain are:


    DTES64

    Monitor/MWait

    Cx16

    PDCM

    The punch line seems to be: "the product version of the destination host. However, I have trouble believing that support for these features have been added to ESXi between the two versions. If it were, VMware has been certainly silent about.

    For what it's worth, explicitly set us the CPUID masks in our virtual machines (no, CVS is not an option for us at this time.) This is the mask:

    CPUID.1.EAX = "00000000000000100000011001010001".

    CPUID.1.ECX = "00000010100110001110001000111111".

    CPUID.1.EDX = "10001111111010111111101111111111".

    CPUID.80000001.ECX = "00000000000000000000000000000001.

    CPUID.80000001.EDX = "00101000000100000000100000000000".

    cpuid.d.EAX = "00000000000000000000000000000000".

    cpuid.d.ECX = "00000000000000000000000000000000".

    cpuid.d.EDX = "00000000000000000000000000000000".

    Note that the bits of the message complains (2, 3, 14, 15) * are * in fact forced to '1' in our mask of cpuid.1.ecx. That means (if I understand correctly), ESXi does not have the virtual machine unless the host processor supports the feature. And in our case, the virtual machine will start with happiness on nodes, with both versions. It will be not simply migrate between them.

    So, long story short, is this a bug of ESXi? The error message is misleading? I understand something?

    Thank you


    Matt

    To use the masks feature VM in this way, you must replace all the 1 to your masks with-'s:

    CPUID.1.EAX = "00000000000000-000000 - 00-0 - 000-

    CPUID.1.ECX = "000000-0-00--000---000-000---".

    CPUID.1.EDX = '-000 - 0-0 - 0-

    CPUID.80000001.ECX = "0000000000000000000000000000000 -"

    CPUID.80000001.EDX = "00-0-000000-00000000-00000000000.

    cpuid.d.EAX = "00000000000000000000000000000000".

    cpuid.d.ECX = "00000000000000000000000000000000".

    cpuid.d.EDX = "00000000000000000000000000000000".

    Zeros erases the features that are not available on your hosts Westmere, and dashes will leave the other one features.  The problem with those masks was forced to you certain features on who would have normally been off.

  • Instructions for the destination folder locked on Mac to work doesn't have a Photo Downloader

    A member of the community directed me to http://kb2.adobe.com/cps/920/cpsid_92046.html "Adobe Photo Downloader is not responding after clicking Choose/Mac OS" when I posted that as I was downloading photos from a memory card in PSE9 on a Macbook that the destination folder screen is locked won't let me choose a destination folder. Out file destiination screen that I had to force to leave every time. I don't shoot raw. However, I followed step 1 in the instructions to install the RAW 6.6 or update more high. using the AdobePatchinstaller. After that I used the Patchmaster, I received the message "some updates could not be installed, update is not applicable."  To step #3, I was invited to use the Advisor, I think it is called. He ran a diagnostic and said "Creative Suite product installation Inspector has identified the issues. Inspector discovered a problem but cannot determine the cause... "Then the problem was transmitted by the system for analysis. Is there anything else I can try to be able to "unlock" my destination files during the download?

    Wait, you have Lightroom and Photoshop Elements, but you choose to use the elements Organizer? Most people who have LR and PSE use LR for the lion share of the work and publisher of PSE as external editor for more detailed retouching (without taking into account the Organizer in total). I certainly wouldn't recommend using both applications to manage your files, does not synchronize two catalogs, so changes made in a fair will cause problems in the other.

    Please, correct spelling when you type the path of the file. If you add or subtract 's' of anywhere, you're going to have to deal with two different routes. You probably don't want to put one of your images in any folder with "lrdata" in the name.

    Editing the APDPreferences.xml file is a work-around. When, in the Photodownloader, if you click on the button choose, and then select a file, this information is saved to the location of this file tag. My editing this file by hand, you are pre-empting the button choose, you enter the information in a different way. In this way, once started you the Photodownloader you don't have to click on the button choose, because it will continue to freeze. These steps do not stop the gel does not happen.

    In addition, you have ignored the solution number 2 of the knowledge base document, which is much easier to use than the solution number 3.

    Ultimately, however, I would definitely use Lightroom to import all your images from your camera.

  • How can I change the destination folder to Windows Picture import in the Vista autoplay version. ?

    The destination folder somehow Autoplay went under the windows default 'Photos' parameter in a subfolder in 'Photos' when you use the option 'Import using Windows' Auotplay. Default AutoPlay program area does not choice for import folders, only actions to choose from. How can I change the default import folder back to 'Pictures' Autoplay when importing photos using Windows Vista import?

    If your Options to AutoPlay in Control Panel, Autoplay, devices, (your camera that there are listed) are defined to import pictures using Windows on the menu drop-down, then when you plug your camera you will get a low popup to the right of your screen.

    Click on Options, you will get an another popup that you can change the destination folder.

  • There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    There was a problem creating the destination folder. If please check the permission of folder or choose a different folder.   What that means, tried to name several different folders, but still the same error message. Would be grateful for the help!

    This means that the folder you want to create is blocked because of file permissions. The drive or folder you are trying to create the destination folder is set to read-only, and your username does not have write permissions.

  • Cannot be saved in the Destination folder with the Batch command

    I am trying to save images for the web with a batch command.

    It seems that they are saved in the original folder used when creating the action.

    The destination folder, I chose in the command batch window is not written in.

    Is there a cure for this?

    Start your action recording and do all the steps you would if editing an image (in addition to open; open is done by the batch script). Thus, for example: resize your image; convert to profile (sRGB); Save as (using the short keys Ctrl + Alt + S (win) or Cmd + Opt + S (mac)); Close (Ctrl + W or Cmd + F). Save As has been used, economy will be like a copy. Well, which means that when you close it you will be asked whether to save the original - select 'no '. Now, you have completed the Action then finalize by stop recording. Every bit of this info will be published in the Action.

    Now give her another chance.

  • How to change the destination folder on a computer for an Officejet Pro 8500 network scans.

    The manual says to launch the HP Device Manager. There is no such program in the Application directory.  The closest thing is a utility that is more easily accessible through system preferences.  But there is nothing in the utility for adjusting the settings of the scanner!  I even restarted the installer where I put the destination initially, but it never shows the screens for this now?  Is there something other in fact named device manager HP OSX that will override the setting of the destination folder for the scans initiated from the printer?

    Hi DMaclay,

    you use the digital archiving functionality to scan directly into a folder? You can in this case, just open the built-in webserver (EWS) for your device and set the Profiler where create a new one with another folder.

    The integrated Web server, you can easily access by entering the IP address of the Officejet in your browser (e.g. Safari). Then go to digital archiving and choose Scan to network folder. Here, you can modify existing profiles or add a new one.

    If it is not the function you use, please provide the number of the exact product for your device and that Mac OS version you are using.

  • Installation of the Photoshot 13 elements. error message: "this is a problem when extracting the files. Check the amount of space available on your computer and the rights to write to the destination folder. I have 1.38 TB of free space and total control

    I try to install photoshop elements 13, that I bought and downloaded from Amazon. When I try to install it I get the following error message: "this is a problem when extracting the files. Check the amount of space available on your computer and the rights to write to the destination folder. I administrar 1.38 TB of free space and total control.

    Charles please do not remove the installation files in the Program Files directory.  I recommend to extract the installation to your downloads folder or your desktop files.  Once installation files are extracted, you can then run the installation program to install Photoshop elements 13.

  • If I use "Copy as DNG" during import, I can delete the JPG LR4 copied in the destination folder?

    When I started using the LR4 I was shooting RAW + JPG on my camera.  I realized that I never use these JPG files for nothing and they are just too much room.  I thought LR4 was just import the RAW files and convert them to DNG, but when I looked in the destination folder in Windows, there are JPG files in there also.  If I have the catalogue in LR4, it shows just the DNG files and makes no mention of JPG files at all and even said after importation that "non - raw files have been imported not»

    I'm sure to go there in Windows, sort by type and then delete the jpgs?  Who will have an effect on my Lightroom Catalog?  Other discussions make mention of some of the pictures showing RAW + JPG on the thumbnail, but mine only show the DNG and don't watch no + JPG anywhere.

    I did more research for this but they all seem to apply to previous versions of lightroom or people not using not copy as DNG option.  If it is safe to delete these files jpg out, would you recommend resyncronizing folders in my catalog after you delete the jpgs?

    Thank you

    If you do not want the jpg files, and you are sure that they are not in Lightroom, then go ahead and delete them. Just be sure...

    There are no synchronization point folders if you don't know you have everything.

  • Error message: "the file names would be too long for the destination folder.

    I move the files from internal hard drive to external hard drive using cut and paste.  I get a message "the file name would be too long for the destination folder.  You can shorten the file name and try again, or try a location with a shorter path. "I then gives me choices to skip or cancel.  What happens to files that are ignored?  Are they deleted?  I don't want to lose all the data, but there are more 2 000 files with this problem, so passing by and rename each one really isn't a viable solution.  I don't really understand how the file names were originally created/saved about a problem that is only now that I want to move them.  The disc source and destination are NTFS.  Is there a solution for this?  It is imperative that no data is lost.  Thanks for any help you can offer.

    On Wednesday, 10 April 2013, 12:16:23 + 0000, MADinIowa wrote:

    I move the files from internal hard drive to external hard drive using cut and paste.  I get a message "the file name would be too long for the destination folder.  You can shorten the file name and try again, or try a location with a shorter path. "I then gives me choices to skip or cancel.  What happens to files that are ignored?  Are they deleted?

    N ° to check that what I say is correct, create a new folder
    for the purposes of the trial and to make a copy of some files. To ensure that
    one of them has a long name (rename if necessary), and then try to copy
    These files on the external drive. When you get the message, choose
    'jump' and see what happens.

Maybe you are looking for

  • What is the mozilla firefox update Shockwave Flash plugin AND what is the latest version of Adobe Flash Player?

    After update of mozilla firefox and come here to help another user pointed out that I had several Flash plugins below. Before updating, I was updating from mozilla firefox and Adobe. Of course, things were NOT up-to-date. I managed to delete the obso

  • Upgrade old macbook pro with OS x 10.7?

    This is my current mac book: Model name: MacBook Pro Model identifier: MacBookPro6, 1 Processor name: Intel Core i7 Processor speed: of 2.66 GHz Number of processors: 1 Total number of cores: 2 (By heart) L2 cache: 256 KB L3 Cache: 4 MB Memory: 8 GB

  • Satellite A40 - 221 - drivers need

    Hello I am an old toshiba satellite A40-221 and the cause of a problem, I need to format so if someone knows where I can get drivers please answer fast. I've looked everywhere and I can't find them. (I lost the recovery CD) :(

  • Re: How to upgrade the memory on Equium U300-15I

    I've searched the forums and yes I found the son with Assembly instructions, but I do not have a manual for my laptop bought recently renovated.My problem is to determine which cover to locate the memory slots. I have 4 GB custom which should arrive

  • AVSDK5 protection service active singelton

    AVSDK5 singleton service active protection keeps coming back... It seems to hang when restarting System... should I worry about this... or it will harm my computer. What is a worm... or some kind of meeting point net microsoft?  he hangs up my system