ASP GetDriveName Method
Complete FileSystemObject object reference manual
The GetDriveName method returns a string containing the drive name of a specified path.
Syntax
FileSystemObject.GetDriveName(path)
| Parameters | Description |
|---|---|
| path | Required. The path whose drive name is to be returned. |
Example
<%
dim fs,dname
set fs=Server.CreateObject("Scripting.FileSystemObject")
dname=fs.GetDriveName("c:\test\test.htm")
Response.Write(dname)
set fs=nothing
%>
Output:
c:
Complete FileSystemObject object reference manual