Change render location function not working

Explorer ,
Sep 08, 2022 Sep 08, 2022

Copy link to clipboard


I have this function to change the render locations on the items in the queue. I can't get it to work however. I'm getting the file path either from the preferences or by asking the user to choose a new location before this function is run. My script does not seem to trigger the function because I don't see the alert dialogs that I have in there. 

function ChangeRenderLocations(newLocation) {
    var newLocation = Folder.selectDialog("Select a render output folder...");
    alert("changing render location to: " + newLocation);

    if (newLocation != null) {

        // Process all render queue items whose status is set to Queued.
        for (var i = 1; i <= app.project.renderQueue.numItems; ++i) {
            var curItem = app.project.renderQueue.item(i);

            //if (curItem.status == RQItemStatus.QUEUED) {
                // Change all output modules for the current render queue item.
                for (var j = 1; j <= curItem.numOutputModules; ++j) {
                    var curOM = curItem.outputModule(j);

                    var oldLocation = curOM.file;
                    curOM.file = new File(newLocation.fsName + "/" +;

                    alert("New output path:\n" + curOM.file.fsName, scriptName);

    } else {
        var newLocation = Folder.selectDialog("Select a render output folder...");


This function is triggered by this portion of my script:

    var renderFolder = new Folder(myScriptPal.grp.groupOne.groupSettings.btn_resetOutput.helpTip);
    consoleLog("Finished building, now wrapping up...");

    //change render locations
    if (renderFolder != null) {
        consoleLog("Render folder checked out, setting render queue up now.")
    } else {
        consoleLog("Render folder did not check out. Asking the user for a new one.")
        var newLocation = Folder.selectDialog("Select a render output folder...");







Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation

Make your promotional social content with Adobe Express.

Get started quickly with free templates: