Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP GetDriveName Method

ASP GetDriveName Method


FileSystemObject Reference 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:


FileSystemObject Reference Complete FileSystemObject object reference manual