August 1999
Intermediate to advanced
1488 pages
72h 53m
English
filesystemobject.DriveExists(letter)
The DriveExists() method is used to determine whether a drive exists or not. This method takes letter as a parameter, which specifies a drive letter to look for.
Listing 9.77 shows how to check for the existence of a D drive.
<html> <body> <script language="JScript"> <!-- Hide // function checks for the existance of drive D. function checkDrive() { var myObject; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); // Check for the existance of a D drive if(myObject.DriveExists("d")){ alert("Drive D exists"); } else { alert("Drive D doesn't exist"); ... |
Read now
Unlock full access