finding all docs with a specific link filePath


hello,

 

i'm trying find out name of documents specific link filepath.

 

before run script need know nothing bad going happen, please can give me advice?

 

var myfolder = folder ("a:\work in progress/jake/indd files/");
var mydocs=[];
var myfiles = myfolder.getfiles("*");

for (i=0;i<myfiles.length;i++){
   
    $.writeln(myfiles[i].displayname);
   var doc =  myfiles[i].open();
   var doclinks = doc.links;
   (j=0;j<doclinks.length;j++){
       if (doclinks[i].filepath="a:\work in progress\jake\image links\aqualimb 100kg\aqua limb.eps"){
           mydocs.push(doc.name)
           }
       doc.close();
    }

folder ("a:\work in progress/jake/indd files/");

 

is not going work, because \w interpreted control character. use either of these two:

 

folder ("a:\\work in progress\\jake\\indd files\\");

folder ("/a/work in progress/jake/indd files/");

 

myfolder.getfiles("*");

 

might not work either. use myfolder.getfiles("*.*");

 

and links have name, graphic's name, this:

 

if (doclinks[i].name === 'aqua limb.eps')

 

and mind =s: doclinks[i].filepath = "..." tries set file path, not possible anyway, script break on (i guess).

 

peter



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop