The Item property sets or returns an item based on a specified key in a collection of files.
<html> <body> <script language="JScript"> <!-- function getItem(foldername) { var myObject, f, filesItem; myObject = new ActiveXObject("Scripting.FileSystemObject"); f = myObject.GetFolder(foldername); filesItem = f.files.Item("Setup.exe"); document.write("The file that you got is: " + filesItem); }--> </script> <form name="myForm"> Enter the name of a folder which contains files. <input type="text" size="35" name="file"> <br><br> <input type="Button" value="Get File Item" onClick='getItem(document.form1.file.value)'> </form> </body> </html>