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