August 1999
Intermediate to advanced
1488 pages
72h 53m
English
file.Type
The Type property is used to get information pertaining to the type of file.
Listing 9.65 shows an example of how the Type property is used to get the type return the type of file that myTest.txt is.
<html>
<body>
<script language="JScript">
<!-- Hide
function get()
{
var myObject, f;
// Create an instance of the FileSystemObject
myObject = new ActiveXObject("Scripting.FileSystemObject");
// Gets the file myTest.txt
f = myObject.GetFile("c:\\tmp\\myTest.txt");
alert("The name type is: " + f.Type);
}
//-->
</script>
<form name="myForm">
<input type="Button" value="Get File Type" onClick='get()'>
</form>
</body>
</html>
|
Read now
Unlock full access