Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

JScript File Object Drive Property

Returns the drive letter of the drive on which the specified file resides. Read-only.

Syntax: JScript File Object Drive Property

object.Drive

Arguments: JScript File Object Drive Property

object

A File object.

Remarks: JScript File Object Drive Property

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.