August 1999
Intermediate to advanced
1488 pages
72h 53m
English
filesystemobject.GetDriveName(letter)
The GetDriveName() method is used to get the name of a specified drive. This method takes drive as its only parameter, which represents the letter of drive for which to get the name.
Listing 9.84 shows how the GetDriveName() method is used. An instance of the FileSystemObject is created and then used to get the name of the C drive.
<html> <body> <script language="JScript"> <!-- Hide function getdrive() { var myObject, drive; // Create an instance of the FileSystemObject myObject = new ActiveXObject("Scripting.FileSystemObject"); // Gets the name of the specified drive drive = myObject.GetDriveName("c:\\"); ... |
Read now
Unlock full access