August 1999
Intermediate to advanced
1488 pages
72h 53m
English
driveobject.Path
The Path property of the Drive object contains the path of the specified file, folder, or drive.
Listing 9.32 displays drive C's path.
<script language="JScript">
<!-- Hide
//Create a string to hold the drive path
var drivePath = "C:";
//Create a file system objectvar fileSysObj = new
ActiveXObject("Scripting.FileSystemObject");
//Create a Drive object for drive C
var drive = fileSysObj.GetDrive(fileSysObj.GetDriveName(drivePath));
//Display the path of drive C
document.write("The path of drive C is ",drive.Path);
//Hide End -->
</script>
|
Read now
Unlock full access