Open In App

ASP GetDrive Method

The GetDrive Method in ASP is used for returning the Drive Object that correspondence to a drive in a specified path. It is a predefined method of the FileSystem Object. 

Syntax:



FileSystemObject.GetDrive(drivespec) 

Parameter Values:

Example Code: Below code demonstrates the ASP GetDrive Method. 






<%
dim fs,d
set fs=Server.CreateObject("Scripting.FileSystemObject")
set d=fs.GetDrive("d:\")
response.write("Drive is:" + d)
set fs=nothing
%>

Output:

Drive is: d
Article Tags :