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

How to export a list of links from indesign cc 2020

Explorer ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Does anyone know how I can save out/export a text file list of all the links in my inDesign file please?

Cheers.

TOPICS
How to , Import and export , Scripting , Type

Views

10.0K

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 3 Correct answers

Community Expert , Mar 17, 2020 Mar 17, 2020

Choose File>Package, click Report, then Cancel. The saved text file will list links and link info.

 

Screen Shot 14.png

Votes

Translate

Translate
Community Expert , Mar 17, 2020 Mar 17, 2020

Select the links in the links panel and the in the flyout menu(accessed by clicking the 3 horizontal lines on the top right of panel), select Copy Info and then Copy Info for selected links. Then you can paste the info in a text file

 

-Manan

Votes

Translate

Translate
Advisor , Mar 17, 2020 Mar 17, 2020

Hello,

If you're on a Mac check out the link below....

 

https://indesignsecrets.com/create-a-list-of-linked-files.php

 

Regards,

Mike

Votes

Translate

Translate
Community Expert ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Choose File>Package, click Report, then Cancel. The saved text file will list links and link info.

 

Screen Shot 14.png

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
Explorer ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Good stuff.

Thank you Rob.

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 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Select the links in the links panel and the in the flyout menu(accessed by clicking the 3 horizontal lines on the top right of panel), select Copy Info and then Copy Info for selected links. Then you can paste the info in a text file

 

-Manan

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
Explorer ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Nice one!

Both ways work – both have pros and cons.

But this is great help.

 

Thank you.

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
Advisor ,
Mar 18, 2020 Mar 18, 2020

Copy link to clipboard

Copied

Hello,

Try the .jsx version for your needs.

 

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
myLinkName.push(myLinks[i].name);
}

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));

file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');

Regards,

Mike

 

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
Explorer ,
May 19, 2020 May 19, 2020

Copy link to clipboard

Copied

Hello, could you please make modification of yours script so it would use one report log file for multiple documents.

For example log can be placed at fixed location as root of C (C:\links_log.txt)

Script should make one line name of the file and than list of links followed by separation of few dashes.

 

Is this very complicated to be done?

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
Explorer ,
Mar 19, 2021 Mar 19, 2021

Copy link to clipboard

Copied

Hi Mike,

    thank you for such a great script!  It works fine.

I need also the page number of the image on the list.

Is that possible ?

Best regards

 

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
New Here ,
Jun 29, 2023 Jun 29, 2023

Copy link to clipboard

Copied

This code works great!
Do you know if it's possible to get the entire path? I'm not seeing anything on how to do it in the documentation.

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
Advisor ,
Jun 29, 2023 Jun 29, 2023

Copy link to clipboard

Copied

@Tydence! 

 

Give this a try...

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
myLinkName.push(myLinks[i].filePath);
}

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));

file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');

Regards,

Mike

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
New Here ,
Jun 29, 2023 Jun 29, 2023

Copy link to clipboard

Copied

LATEST

Yes! That works great! Thanks for the help, I was really stumped on this one!

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
Advisor ,
Mar 17, 2020 Mar 17, 2020

Copy link to clipboard

Copied

Hello,

If you're on a Mac check out the link below....

 

https://indesignsecrets.com/create-a-list-of-linked-files.php

 

Regards,

Mike

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
Explorer ,
Mar 18, 2020 Mar 18, 2020

Copy link to clipboard

Copied

Thank you Mike.

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 Beginner ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Is it possible to export a list of every link in the order they appear in the document? Or alphabetical? This would be very useful for a back of book catalog. 

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 ,
Aug 05, 2022 Aug 05, 2022

Copy link to clipboard

Copied

Hi @eriks3 , You could add a sorting function to @Mike Bro ’s script—this would be alphanumeric:

 

doc = app.activeDocument;
myDocFolder = app.activeDocument.filePath;
var fileName = doc.name.replace(/.indd/, "");
var linkNames = fileName + '_Links-list.txt';

var file = new File(myDocFolder.fsName + "/" + linkNames);

var myLinkName = new Array();
myLinks = app.activeDocument.links;
for(var i=0; i < myLinks.length; i++){
    myLinkName.push(myLinks[i].name);
}
myLinkName.sort(sortAlphaNum);

var mylist = myLinkName;
var myNewlist = (String(mylist).replace(/,/g, '\r'));


file.encoding = 'UTF-8';
file.open('w');
file.write(myNewlist);
file.close();
alert('Done creating links list!');


function sortAlphaNum(a, b) {
    var reA = /[^a-zA-Z]/g;
    var reN = /[^0-9]/g;
    var aA = a.replace(reA, "");
    var bA = b.replace(reA, "");
    if (aA === bA) {
        var aN = parseInt(a.replace(reN, ""), 10);
        var bN = parseInt(b.replace(reN, ""), 10);
        return aN === bN ? 0 : aN > bN ? 1 : -1;
    } else {
        return aA > bA ? 1 : -1;
    }
}

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
Enthusiast ,
Aug 06, 2022 Aug 06, 2022

Copy link to clipboard

Copied

This will make CSV (among a few formats). Open in a spreadsheet and sort however you like.

http://www.marspremedia.com/software/indesign/links-report

 

William Campbell

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