Skip to main content
Participating Frequently
July 27, 2017
Answered

Missing Links In Indesign ...

  • July 27, 2017
  • 4 replies
  • 7470 views

Hello. I want to update in indesign missing links, which are however in many different subfolders. this is not possible. Is there a script or a plugin? Thank you!

    This topic has been closed for replies.
    Correct answer vinny38

    if $15 aren't too expensive for you, you might want to give this a shot : Indesign Image Relinker – Dr Scripto

    (never tried it)

    4 replies

    Participating Frequently
    September 8, 2023

    Worked for me https://www.marspremedia.com/software/indesign/links-relink-subfolders ... also if images are duplicated in subfolders you are notified to manually assign ... InD2023

    Participant
    December 28, 2022

    For anyone that needs it, I've written this script. This script will search for any missing image files in the specified parent directory and all its subdirectories, and if it finds any it will attempt to re-link them. 

    Simply replace "path/to/parent/directory" with your desired parent directory (keep the quotes), save the file as a .jsx file in the scripts directory and run it. for more info on how to do this, go here: https://helpx.adobe.com/indesign/using/scripting.html

     

    // Replace "path/to/parent/directory" with the actual path to the parent directory
    var parentDirectory = new Folder("path/to/parent/directory");
    
    // Get the current document
    var doc = app.activeDocument;
    
    // Iterate through all the links in the document
    for (var i = 0; i < doc.links.length; i++) {
      var link = doc.links[i];
    
      // Check if the link is missing
      if (link.status == LinkStatus.LINK_MISSING) {
        // Search all subdirectories within the parent directory for the missing file
        var missingFile = searchForFile(parentDirectory, link.name);
    
        // If the file is found, re-link it to the document
        if (missingFile) {
          link.relink(missingFile);
          link.update();
        }
      }
    }
    
    // Save the document
    doc.save();
    
    /**
     * Recursively searches for a file with the specified name within the specified directory and all its subdirectories.
     * @9397041 {Folder} directory - The directory to search in.
     * @9397041 {string} fileName - The name of the file to search for.
     * @Returns {File} The file if found, or null if not found.
     */
    function searchForFile(directory, fileName) {
      // Get a list of all files within the directory
      var files = directory.getFiles();
    
      // Iterate through each file
      for (var i = 0; i < files.length; i++) {
        var file = files[i];
    
        // If the file is a directory, search within it recursively
        if (file instanceof Folder) {
          var result = searchForFile(file, fileName);
          if (result) {
            return result;
          }
        }
        // If the file is the one we're looking for, return it
        else if (file.name == fileName) {
          return file;
        }
      }
    
      // If the file was not found, return null
      return null;
    }

     

    Participating Frequently
    September 6, 2023

    Sadly, it doesnt seem to be working in Adobe Indesign 2023 ... any hint? Thanks for help.

    Robert at ID-Tasker
    Legend
    September 6, 2023

    Would help if you say what error you have

     

    JonathanArias
    Legend
    July 27, 2017

    You need to start packaging your jobs as part as your workflow. this is the only way maintain all of your files together with the indesign document no matter where things move, share drives or who is working on it.  Its a free feature that takes seconds to run. Go to File>> package and run it after you link your files. after you do this. if you need to add graphics to your layout, you can save them in the links folder that is now created with your package files, or re-package and replace.

    You will have a better organization and make your life easier if you start packaging your files.

    seebauerAuthor
    Participating Frequently
    July 27, 2017

    hi …

    my customer ist working with his own lowresfiles … he will prepare the document and we have to relink the highresfiles …

    Barb Binder
    Community Expert
    Community Expert
    July 27, 2017

    The client should still be using a project folder with all of the links in one subfolder, and as said above, packaging the file for you will take care of it. If you use the same names for low-res and high-res files, you can just copy the high-res files to the project folder and replace the low res files and update links. Worse case, copy all the high-res files to one folder to take advantage of re-linking an entire folder.

    ~Barb at Rocky Mountain Training
    amaarora
    Community Manager
    Community Manager
    July 27, 2017

    Hi,

    You would need to re-link the designs. You can also re-link the entire folder.

    Manage linked or embedded graphics in Adobe InDesign

    -Aman

    seebauerAuthor
    Participating Frequently
    July 27, 2017

    Hello and thanks for the quick reply.

    This is correct, but I can always only link from one single folder and then indesign automatically gets the additional files contained in it. It really works, but then I have to do this manually in the next. And so on.

    But I have to link out from many different subfolders, contained in the mainfolder - this is a big error source if I select a wrong file with a very similar name.

    I would like to select only the main source and indesign should search all contained subfolders and link accordingly.

    I know a software that makes it possible ... "picture wrangler" from northplains.

    But for this I must install xinet on the server ... too expensive ...

    - stephan

    vinny38
    vinny38Correct answer
    Legend
    July 27, 2017

    if $15 aren't too expensive for you, you might want to give this a shot : Indesign Image Relinker – Dr Scripto

    (never tried it)