|
Returns the drive letter of the drive on which the specified file resides. Read-only.
object.Drive
object
A File object.
On UNIX systems, the Drive property is always "/".
The following code illustrates the use of the Drive property on Windows systems:
function ShowFileAccessInfo(filespec)
{
var fs, f, s;
fs = new ActiveXObject("Scripting.FileSystemObject");
f = fs.GetFile(filespec);
s = f.Name + " on Drive " + f.Drive + "<br>";
s += "Created: " + f.DateCreated + "<br>";
s += "Last Accessed: " + f.DateLastAccessed + "<br>";
s += "Last Modified: " + f.DateLastModified;
Response.Write(s);
}
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.