Use getFiles() in an array
hi all,
i'm trying write script searches folder packaged files , searches links of files.
i want store links , files separate arrays.
when put packaged files in array cant seem use getfiles() function.
var links = [],
packaged = [],
files = [],
myfolder = folder( "a:\jake/" ),
mydocs = [],
myfiles = myfolder.getfiles(), //store target files in variable
i;
for ( = 0; < myfiles.length; i++ ) {
if (myfiles[i] instanceof folder ) {
var links = myfiles[i].getfiles( "links" )
packaged.push( links );
}
}
this snippet. packaged array contains links folders when try , loop through them
for ( = 0; < packaged.length; i++ ) {
var y = packaged[i].getfiles()
links.push( y );
}
this doesn't work.
any ideas?
hi,
"links" not extension (to filter) name of folder (a part of path), so:
var links = folder(myfiles[i] + "/links/").getfiles();
jarek
More discussions in InDesign Scripting
adobe
Comments
Post a Comment