ASP GetDriveNameMethod
Complete FileSystemObject Object Reference
The GetDriveName method returns a string that is the drive name of the specified path.
Syntax
FileSystemObject.GetDriveName(path)
| Parameters | Description |
|---|---|
| path | Required. The path for which to return the drive name. |
Examples
<%
dim fs,dname
set fs=Server.CreateObject("Scripting.FileSystemObject")
dname=fs.GetDriveName("c:\test\test.htm")
Response.Write(dname)
set fs=nothing
%>
Output:
c:
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 Other Extensions