Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

ASP GetDriveName Method


❮ Complete FileSystemObject Object Reference

The GetDriveName method returns a string that contains the drive name of the specified path.

Syntax

FileSystemObject.GetDriveName(path)

Parameter Description
path Required. The path that will return a drive name

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