| CSS 341
Fundamentals of Programming Theory and Application |
//
list each file individually
if (numObjects <=
upperLimObjects) {
colFiles.moveFirst();
while
(colFiles.atEnd() == false)
{ objFile =
colFiles.item();
window.alert("file is "
+ objFile.Name);
outputString = outputString +
"\n" +
objFile.Name;
colFiles.moveNext(); }
// repeat the above listing in a single output box
window.alert("The
directory contains " +
outputString); }else{
window.alert("directories
with more than " +
upperLimObjects +" files
are not listed.");
}
|