ÄúµÄλÖãº
Ñ°ÃÎÍøÊ×Ò³
£¾
±à³ÌÀÖÔ°
£¾
VBScript
£¾
VBScript
objects
constants
operators
statements
functions
properties
methods
All Methods
FileSystemObject Object
METHOD: FileSystemObject.GetDriveName
object.
GetDriveName
(path)
This method returns a string that contains the drive name in the specified path. If the drive cannot be determined the
GetDriveName
method will return an empty string.
Note that this method doesn't check the existance or the validity of the supplied path.
Code:
<%
dim filesys, a
Set filesys = CreateObject("Scripting.FileSystemObject")
a = filesys.GetDriveName("c:\DevGuru\website\VBScript.txt")
Response.Write (a)
%>
Output:
"c:"