August 1999
Intermediate to advanced
1488 pages
72h 53m
English
files.Item
The Item property sets or returns an item based on a specified key in a collection of files.
Listing 9.68 shows how to use the Item property.
<html> <body> <script language="JScript"> <!-- Hide // function gets the Item of the file collection // in a specified folder. function getItem(foldername) { var myObject, f, filesItem; // create instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); f = myObject.GetFolder(foldername); // gets the setup.exe file filesItem = f.files.Item("Setup.exe"); document.write("The file that you got is: " + filesItem); }// End Hide --> </script> <form name="myForm"> Enter ... |
Read now
Unlock full access