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

Is there a script/utility to monitor/flag any link outside a specified folder?

Engaged ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

As far as I'm aware the only way to see if all images are in the proper folder is to:

Look and their paths - can take and age depending on the quantity

Copy the whole job folder to the desktop/disconnect to the server, open the INDD file and see what's missing - takes an age

Package it, then compare images - not useful if the images are in multiple folders

"copy links to" - again, not useful if the images are in multiple folders, as duplication will occur

(Mac OS Sierra / Indesign CC 2017)

Views

627

Translate

Translate

Report

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 , Mar 20, 2017 Mar 20, 2017

It means you didn't get the entire code when you pasted or something happened when you edited.

Try this, paste it into the Script Editor application and click Compile. If that doesn't work I can post a compiled version

--------------------------------

tell application "Adobe InDesign CC 2017"

    set fname to choose folder with prompt "Select a destination folder"

    set linklist to ""

    tell active document

        repeat with theLink in every link

            set theLinkPath to file path of theLink

...

Votes

Translate

Translate
Community Expert ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

Hmmm...you really haven't stated a clear objective other than:

...to see if all images are in the proper folder...

But then it seems as though you contradict the notion of "proper folder," by disqualifying packaging, which essentially guarantees (copies of) all linked images are in "the proper folder".

It's not that I'd argue with you with regard to duplication (acknowledged by the reference to 'copies of' above), but realistically, you can't have it both ways; a single, "proper folder" containing all a document's linked images, and zero duplication. If, over the editing history of a document, images were placed from multiple folders outside of the one you'd consider "the proper folder", it's reasonable to assume the images reside in those other locations for a reason; perhaps they are placed in other documents as well.

Where most of my work is carried out, we embrace that duplication and package everything for archiving and life-cycle control; ensuring that no document is dependent on a linked graphic that could become unavailable. Storage is cheap.

Votes

Translate

Translate

Report

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
Engaged ,
Jan 30, 2017 Jan 30, 2017

Copy link to clipboard

Copied

The 'proper folder' in question is the current project inks folder. I want to see if there are links from previous jobs in the current project/job.

Anywhere.jpg

These are live jobs and I want to keep tabs on what's linked. If a previous job is archived/moved/renamed while this one is live, and there's a link to that job, then the link will go missing.

When the job is signed off then packaging is done and ready to archive.

Votes

Translate

Translate

Report

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 ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

It would be scriptable. You could try this AppleScript, which asks you to choose a folder then makes a list of all links not in that folder:

tell application "Adobe InDesign CC 2014"

    set fname to choose folder with prompt "Select a destination folder"

    set linklist to ""

    tell active document

        repeat with theLink in every link

            set theLinkPath to file path of theLink as alias

            tell application "Finder"

                set a to name of parent of theLinkPath

                set b to name of fname

            end tell

            if a is not equal to b then

                set n to name of theLink

                set linklist to linklist & n & return

            end if

        end repeat

    end tell

    display dialog "These placed files are not in the selected folder:" & return & linklist

end tell

Votes

Translate

Translate

Report

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
Engaged ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Cheers Rob, I'll give it a spin tomorrow.

Votes

Translate

Translate

Report

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
Engaged ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

Hi rob, sorry about the long delay in responding. Gave it a whirl but this happened:

Screen Shot 2017-03-20 at 08.20.05.png

not knowing anything about scripting I really don't know what this means

BTW I'm using Adobe InDesign CC 2017, I changed that in the script you posted.

Votes

Translate

Translate

Report

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 ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

It means you didn't get the entire code when you pasted or something happened when you edited.

Try this, paste it into the Script Editor application and click Compile. If that doesn't work I can post a compiled version

--------------------------------

tell application "Adobe InDesign CC 2017"

    set fname to choose folder with prompt "Select a destination folder"

    set linklist to ""

    tell active document

        repeat with theLink in every link

            set theLinkPath to file path of theLink as alias

            tell application "Finder"

                set a to name of parent of theLinkPath

                set b to name of fname

            end tell

            if a is not equal to b then

                set n to name of theLink

                set linklist to linklist & n & return

            end if

        end repeat

    end tell

    display dialog "These placed files are not in the selected folder:" & return & linklist

end tell

-------------------------------------

Votes

Translate

Translate

Report

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
Engaged ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

That worked!

But,

I found that if the file has a QR coded generated within the file you get:

Screen Shot 2017-03-20 at 12.45.53.png

and if there's am embedded image this happens:

Screen Shot 2017-03-20 at 12.47.28.png

But having said that it's very rare that we use QR Codes - or - embed images! It was just coincidence that the first 2 files had them

Thanks rob, I'll send this round the studio for a test!

Votes

Translate

Translate

Report

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 ,
Mar 20, 2017 Mar 20, 2017

Copy link to clipboard

Copied

LATEST

Try this:

-----------------------------------------

tell application "Adobe InDesign CC 2017"

    set fname to choose folder with prompt "Select a destination folder"

    set linklist to ""

    tell active document

        repeat with theLink in every link

            try

                set theLinkPath to file path of theLink as alias

                tell application "Finder"

                    set a to name of parent of theLinkPath

                    set b to name of fname

                end tell

            on error

                set a to ""

            end try

            if a is not equal to b then

                set n to name of theLink

                set linklist to linklist & n & return

            end if

        end repeat

    end tell

    if linklist is not "" then

        display dialog "These placed files are not in the selected folder:" & return & linklist

    else

        display dialog "All links are in the selected folder"

    end if

end tell

-----------------------------------------

Votes

Translate

Translate

Report

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 ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Select all your links in the links panel and copy to folder.

http://indesignsecrets.com/copy-all-your-linked-images.php

It won't copy anything into the folder twice - it just copies what's not there + it relinks them to that folder.

Votes

Translate

Translate

Report

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
Engaged ,
Jan 31, 2017 Jan 31, 2017

Copy link to clipboard

Copied

Yeah but like I said:

"copy links to" - again, not useful if the images are in multiple folders, as duplication will occur

Indesign doesn't look inside sub folders, just chucks them in one big bucket

Votes

Translate

Translate

Report

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