3 Replies Latest reply on Mar 1, 2015 8:13 PM by yjling

    Batch renaming suffix and relinking in InDesign

    Sachinji Level 1

      Hi,

       

      It is possible to documents links can be renamed with updated link as suffix "_1 or _2 or _3..........: only do with the new simple script.


      There are many scripts I have found that rename and relink with prefix. I do not find any script that renames and relink with suffix.


      Suppose a file name is "art.ai" if we use prefix scripts it changes like "1_art.ai" in this case both are not in sequence in list preview of 100 links.

      Screen Shot 2014-11-25 at 6.33.36 pm.png

      I desperately needed something automatic.

      Thanks,

      Sachin

        • 1. Re: Batch renaming suffix and relinking in InDesign
          rob day Adobe Community Professional & MVP
          if we use prefix scripts it changes like "1_art.ai" in this case both are not in sequence in list preview of 100 links.

           

          If you want numbered files to display sequentially by Name in the Finder, the prefix needs to have a leading 0 for numbers less than 10, so instead of 1, 2, 3... 10  you need 01, 02, 03...10, 11.

           

          The script could check for numbers less than 10 and add a leading 0 to the prefix. In AppleScript it would be something like this. If mycounter is 6 you get 06-myfilename, if it's 16 you get 16-myfilename:

           

          --a counter in a repeat loop

          set mycounter to 6

           

          --the number prefix to be added to the file name

          set myprefix to mycounter as string

           

          --check if the number is less than 10 and add a leading 0

          if (count of characters in myprefix) is less than 2 then

              set myprefix to "0" & myprefix

          end if

           

          --returns 06-myfilename

          display dialog myprefix & "-myfilename"

          • 2. Re: Batch renaming suffix and relinking in InDesign
            Sachinji Level 1

            Thanks, Rob Day.

             

            There are many scripts available for prefix.

             

            I need to add suffix

            Example There are 2 or 3 folders with link.

            When package using book or manually second folders all the link moving in first folder message coming for replace,

            I skip those file, it may be 1, 30, 40 images.

            Again open 2nd document indd and want to rename the linked images with base name + suffix (_1) and relinked,

            Than move all these renamed files in the first folder and repeat in third folder with base name + suffix (_2) and relinked.

            When all the links are in the same folder first repeating images are looking together with there basename + suffix.

             

            As shown in the screen grab in the post.

            • 3. Re: Batch renaming suffix and relinking in InDesign
              yjling Level 1

              Hi Sachinji, I am very interested in the scripts that allows one to add prefix to the links. Do you know of any?

              Thanks!