Current position:  Home > Default > Batch Retrieve Image links

Batch Retrieve Image links

Time:December 10
Advertisement
Hi,
I've found the File -> Package -> Report quite helpful for generating a detailed report for image links. However I am dealing with a few hundred files so the act of going into each one and generating a report individually is quite time consuming. I have been able to reduce the overall time by a) customing the hotkey for accessing the Package and b) memorizing the keystrokes required to complete each report however I can't help but think there has to be an easier way.
My assumption is that there would be a way to script such a simple action so that I could simply hit play and have the file generated, am I correct?
If not my second assumption is it would be easier to troll through the XML files and parse the links that way?
Thank-you very much in advance for any and all support in this matter.
Cheers,
Kud
Advertisement
OK, try this out:
var inFolder = Folder.selectDialog("Choose the folder that contains the InDesign documents.");
if(inFolder === null){
          exit();
var outFolder = Folder.selectDialog("Choose the folder to save the reports in.");
if(outFolder === null){
          exit();
var files = inFolder.getFiles("*.indd"),
          fileStrings = [],
          doc, i, l, link, j, k, reportFile;
app.scriptPreferences.userInteractionLevel=UserInteractionLevels.NEVER_INTERACT;
for(i = 0, l = files.length; i < l; i++) {
          doc = app.open(files[i], false);
          reportFile = File(outFolder + "/" + doc.name.replace(/\.indd$/,"") + ".csv");
          fileStrings = ["\"link\",\"status\",\"complete name\""];
          for(j = 0, k = doc.links.length; j < k; j++) {
                    link = doc.links[j];
                    fileStrings[fileStrings.length] = "\"" + link.name + "\",\"" + link.status.toString() + "\",\"" + link.filePath + "\"";
          doc.close(SaveOptions.NO);
          if(fileStrings.length > 1 && reportFile.open('w')){
                    reportFile.write(fileStrings.join("\r"));
                    reportFile.close();
app.scriptPreferences.userInteractionLevel=UserInteractionLevels.INTERACT_WITH_ALL;
So, this will ask you to choose the folder that contains the InDesign documents you want link reports on. It won't descend into subfolders. If your files aren't all in one folder, you can drag aliases/shortcuts into one folder and it should follow them. It will then ask you for a folder to save the report files in. It's set up to make one .csv for each document, and it doesn't produce them for documents that have no links.
Let me know if the file format I've chosen doesn't work for you, or if you'd rather have all of it in one document, or more fields, or whatever.
Tested on CS5 on the Mac.

Acheive Batch retrieval in Static/Programatic VO

-0001-11-30

Hi, Is there any way i can handle batch retrievals in Static/programmatic VO's, Suppose i have a static Vo which reads data from an external API which retrieves 50 rows per call. so i ser my VO tuning to in batches of 50, as needed. also i set queryh

Retrieve weblocation link of a content item

-0001-11-30

how do we retrieve weblocation link of a content item via RIDC / web service? Is there any configuration settings to be done/ enforced when accessing the doc directly via weblocation link. thanksHi , Use DOC_INFO service call and then from the LocalD

How to retrieve the link clicked  inside an iframe ?

-0001-11-30

Hi all.. I have a JSP where i have used an iframe to display the URL's dynamically. (URL's are being passed at run time) I want to retrieve the link's URL (i.e. href attribute value ) when user clicks on the link displayed inside iframe. Say for e.g.

How to retrieve DB links and column names details used in code

-0001-11-30

Hi All, I am looking for code that will retrieve database links name, referenced object and column names used in source code within the schema. It's easy enough to find the link names using xxx_db_links / user_source, the trick part it to list the co

Retrieve the link from Bookmark of Report view on Enterprise Poral

-0001-11-30

Hi All, We are running the BEx queries on Enterprise Portal. When I try to Bookmark a particular View of the query it says: "Bookmark 4XX9XXYJF84229XXQF2TBAZZD saved". If at a later stage I want to run the same view of the report, from where can

TSQL to retrieve Oracle linked server records

-0001-11-30

We're porting an Oracle system to SQL server and it's not going well... Our system is a data warehouse that extracts data from an Oracle operational system. In the Oracle version we use database links to access Oracle. On SQL Server we've created a l

TSQL Retrieve from linked Oracle server

-0001-11-30

We're porting an Oracle system to SQL server and it's not going well... Our system is a data warehouse that extracts data from an Oracle operational system. In the Oracle version we use database links to access Oracle. On SQL Server we've created a l

How to retrieve the link's label with HTML Editor kit?

-0001-11-30

Hi all, I need to retrieve the label that is on a HREF html attribute. In other words I need to retreive the words "Home Page" from this snippet: <b>Home Page</b> I have found tutorials that show how to extract the link itself but no

Batch changing image links

-0001-11-30

My document has about 600 images in it, and I need to make two separate versions of it. The images in the first version are named 1a, 2a, 3a, etc., and the images for the second are 1b, 2b, and so on. Is there a way, or a script, to quickly rename al

Retrieving KM Links

-0001-11-30

Hallo Gurus, Assuming that I have a Resource object like a file. ist it possible to check whether there are existing links pointing to this file? I would be very thankful. Thanks> Hi Julian, > > thank you for your answer > it might be possible

Linking MIC & Batch characteristic

2015-10-11

Hey All My understanding is that to move values from batch characteristic to MIC we need to maintain the link in MIC and this relationship is one to one relationship. We have a business requirement as below. I do 2 types of testing i.e. official & ve

How to batch change domain name in links

2015-10-11

Have several hundred PDF files with links to external files. Links were inserted into Word version prior to PDF'ing. Need a utility or batch tool to update the domain name in the links. For example: Current link:  http://abcserver Must be changed to

Can you retrieve a lost link to online form?

2015-10-11

One of the respondents to my online form has lost their email with a link to their saved form. Is their any way for them or I to retrieve the link?Does the respondent still have the window with the retrieved form? If the retrieved form is still on th

Extension to batch change link relativity

-0001-11-30

I'm trying to find the DW CS3 extension that batch converts all the links from Document to Site Root or the other way around. I can't remember what it was called. Anyone know? I need it to change the links in an HTML email created in DW CS3. Thanks i

Retrieving action from links

-0001-11-30

Hi all, We have a large number of pdf files that contains links to other pdf files. What I would like to do is to scan each pdf file and extract which other files are linked from this file, since this is not known. Ive used GetLinks in order to retri

Read / Get the link destination name in PDF file by JavaScript

2015-10-11

Is there is any way to read or retrieve the link destination name by the JavaScript? In my document there is more then 100 of link with destination name of the named destination, now I want read all the link and retrieve the destination name in the l

Make table of contents links keep current zoom level, not zoom out to full page

2015-10-11

When Indesign creates tables of contents, they automatically link to the paragraphs the links point to, so that in an interactive PDF, clicks and prods take the user to that page. Great. What's not so great is, that the hyperlinks / cross-references

Linking between movement type 101 & 321

2015-10-11

Hi All, We prepare the GRN against the Purchase order vide movement type 101, this material is lying for Quality inspection in same plant and storage location After Quality Inspection we are transferring this material from Quality Inspection to unres

IW52 + Get link data  when stored via 'Store the business document'

-0001-11-30

Hi, For  Notification change - IW52: FM BDS_GOS_CONNECTIONS_GET is used to get the information when attachment are stored via 'Create attachment' . CALL FUNCTION 'BDS_GOS_CONNECTIONS_GET'     EXPORTING       classname             =  'BUS2080'       o