0 Replies Latest reply on Jan 6, 2016 12:08 AM by karthiks94217840

    How to relink and renaming images

    karthiks94217840 Level 2

      Dear Friends,


      Hi all, I need to relink lots of -missing- images (i.e. "K_MNYCEPT221161_C01PT_002T.ai") to their high resolution versions (i.e. "K_MNLESE850231_C01PT_002T.ai"). So, is there a way to tell InDesign to 'read' all the characters but the last two before the dot, while searching for links? HR images are all in one folder, so there's no danger to relink wrong ones. I'm pretty a noob with js or applescript, but I'll be glad if someone of you could help me


        sourceFolder = Folder.selectDialog("Show me a source folder"),  
        mLinks = app.activeDocument.links.everyItem().getElements(),  
        cLink, cFile;  
      while ( cLink = mLinks.pop() ) 
        if (cLink.status == LinkStatus.NORMAL) continue;  
        cFile = File(cLink.name.replace("K_MNYCEPT221161_","K_MNLESE850231_") ); 
        if ( !cFile.exists ) continue;