Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 92406

Copy all indd files to a specific location

$
0
0

Hello guys I have no idea why my script doesn't work the way I want,

 

I want my script to work this way,  when I pick a folder from the dialog my script choose all the .indd files

and put them in a specific location

 

 

See code below

 

 

 

var myFolder = Folder.selectDialog ('Choose a Folder');
$.writeln('-------------------------------\r' + myFolder.displayName + '\r-------------------------------\r');
if(myFolder != null){  var myFiles = myFolder.getFiles('*.indd');  for (i = 0; i < myFiles.length; i++)  {  var myFile = myFiles[i];  // myTargetFolder = "/Kommuni/LaRe/LareAUTO/341542" // put files here



myFiles[i].copy ("/Kommuni/LaRe/LareAUTO/341542/");


// $.writeln(myFile.displayName);  // just for write the data in console  }
}

 

 

Can someone help me to put a correct code here

 

Thank you in advance

 

Cheers all members


Viewing all articles
Browse latest Browse all 92406

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>