Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

get alert if .indd files not found

$
0
0

Hi Forum,

 

I tried to get alert if found and if not.

 

the alert is shown only if the .indd is found inside the folder. 

 

when deleted .indd files and checked, the "not found" alert is not produced.

 

var folder = new Folder("/Users/Wander5/Desktop/Wander5");

var files = folder.getFiles('*.indd');

 

for (var i=0; i<files.length; i++) {

var file = files[i]; 

  if (file.exists) {

alert("FOUND!") }

  else {

alert ('not found')

}

       //break;

}

 

Please can anybody tweak on this.

 

thanks


Viewing all articles
Browse latest Browse all 37788


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