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

Re-link Multiple Files

New Here ,
Oct 07, 2020 Oct 07, 2020

I would like it if illustrator had the ability to relink multiple files at the same time like Indesign does.

 

I have a file setup with 30 linked pieces of art, if I wanted to relink all 30 with a new version, I would have to do one at a time. I mean I could select all, but I will still have to find the new version 30 times.  Indesign has a feature that groups links based on their file name and you can relink that group with another file, so its all done with one click.

 

Is there another way of doing this, without tricking Illustrator into thinking its missing the link, because thats the only time it allows you to "Apply to all missing links"

TOPICS
Feature request
1.8K
Translate
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

correct answers 1 Correct answer

Community Expert , Oct 07, 2020 Oct 07, 2020

Illustrator will look for linked files in a folder with the name Links located in the same folder where the Illustrator file was saved.

So you could create a folder named Links, put your modified versions in there (they need to have the same name).

Delete or move the old version (so Illustrator cannot find those).

Open the Illustrator file and save.

Translate
Adobe
Community Expert ,
Oct 07, 2020 Oct 07, 2020

Illustrator will look for linked files in a folder with the name Links located in the same folder where the Illustrator file was saved.

So you could create a folder named Links, put your modified versions in there (they need to have the same name).

Delete or move the old version (so Illustrator cannot find those).

Open the Illustrator file and save.

Translate
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 ,
May 03, 2023 May 03, 2023

Very helpful, I'll now make sure this is my standard workflow practice from now on.

Translate
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 ,
Oct 07, 2020 Oct 07, 2020

I have the same issue. We link low res files for proofing purposes and then relink high res when it goes to production. Would LOVE to be able to relink all the files in a document at the same time (without having to go to the linked oubject and select "relink" for every single one.). Would also love it if it put the name of the file in the window when trying to relink. Why is it blank!? 

Translate
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 ,
Feb 03, 2023 Feb 03, 2023

Wait. Hold up, are you saying that if I have 30 files in a folder that is not called "Links" I would have to relink every single one of them manually if the folder name or path changed?  

Translate
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 ,
Feb 03, 2023 Feb 03, 2023

No, there is a checkbox "Apply to All" for that.

Screenshot 2023-02-03 at 19.34.42.png

Translate
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 ,
Jun 17, 2024 Jun 17, 2024
LATEST

In case you don't want to restart everytime you want to change all links to the same file at once, you can run this script, choose the link you want to replace, choose your new file, and it will replace any link sharing that name automatically. 

/**
 * This script replaces all linked files with the same name at one time in Adobe Illustrator.
 * It allows the user to select the link to replace from a list of current links using a drop-down menu
 * and then choose the new file from a dialog.
 */

function replaceAllLinksWithSameName() {
    var doc = app.activeDocument;
    var placedItems = doc.placedItems;
    var linkNames = [];

    // Collect all unique link names
    for (var i = 0; i < placedItems.length; i++) {
        var placedItem = placedItems[i];
        if (placedItem.file) {
            var fileName = placedItem.file.name;

            // Check if the fileName is already in linkNames
            var isUnique = true;
            for (var j = 0; j < linkNames.length; j++) {
                if (linkNames[j] === fileName) {
                    isUnique = false;
                    break;
                }
            }

            if (isUnique) {
                linkNames.push(fileName);
            }
        }
    }

    if (linkNames.length === 0) {
        alert("No linked files found in the document.");
        return;
    }

    // Create a dialog for link selection
    var dialog = new Window("dialog", "Select Link to Replace");
    dialog.orientation = "column";

    var dropdown = dialog.add("dropdownlist", undefined, linkNames);
    dropdown.selection = 0;

    var okButton = dialog.add("button", undefined, "OK");
    okButton.onClick = function() {
        dialog.close(1);
    };

    if (dialog.show() != 1) {
        return;
    }

    var oldFileName = dropdown.selection.text;
    var newFile = File.openDialog("Select the new file to replace " + oldFileName);

    if (newFile) {
        var count = 0;

        for (var k = 0; k < placedItems.length; k++) {
            var placedItem = placedItems[k];
            if (placedItem.file && placedItem.file.name === oldFileName) {
                placedItem.file = newFile;
                count++;
            }
        }

        alert(count + " links have been replaced.");
    } else {
        alert("Operation cancelled or no file selected.");
    }
}

replaceAllLinksWithSameName();
Translate
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