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

Applescript relink all to a specific folder

New Here ,
Feb 11, 2015 Feb 11, 2015

I'm somewhat ok with scripting, but having problems.

I have a script that I'd like to relink missing links to a certain folder, but it's not linking when I run the script.

Any idea what I have wrong here? This is the portion out of my much bigger script I'd like to fix:

tell application "Adobe InDesign CS6"

  tell active document

  set allLinks to every link whose status is link out of date

  repeat with thisLink in allLinks

  relink thisLink to POSIX file path "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"

  end repeat

  end tell

end tell

I have hundreds of indd files to deal with monthly from my customer. Instead of the customer sending me the same 7-800 links all the time, I'd like to just run this script and relink all to a specific folder where I have all their links archived.

TOPICS
Scripting
1.0K
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

Contributor , Feb 12, 2015 Feb 12, 2015

Hi, Try this:

tell application "Adobe InDesign CS6"

    tell active document

        set allLinks to every link whose status is link out of date

        set myPath to "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"

            repeat with thisLink in allLinks

try

                set currFileName to name of thisLink

                set newPath to myPath & currFileName

                relink thisLink to newPath as alias

end try

            end repeat

    end tell

end tell

gr

Translate
Contributor ,
Feb 12, 2015 Feb 12, 2015

Hi, Try this:

tell application "Adobe InDesign CS6"

    tell active document

        set allLinks to every link whose status is link out of date

        set myPath to "Volumes:Documents:WORKING:As Needed Items & Scripts:_Rugs:"

            repeat with thisLink in allLinks

try

                set currFileName to name of thisLink

                set newPath to myPath & currFileName

                relink thisLink to newPath as alias

end try

            end repeat

    end tell

end tell

gr

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
New Here ,
Feb 12, 2015 Feb 12, 2015
LATEST

Thanks greenkookie! That work perfect. I did make 1 minor change from

set allLinks to every link whose status is link out of date

to

set allLinks to every link whose status is link missing

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