ASP GetDrive Method Last Updated : 02 Mar, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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: drivespec: It is a required attribute. It can be a drive letter (c), a drive letter with a colon appended (c:), a drive letter with a colon and path separator appended (c:), or any network share specification (\computer2\share1). Example Code: Below code demonstrates the ASP GetDrive Method. ASP <% 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 Comment More infoAdvertise with us Next Article ASP GetDrive Method M manaschhabra2 Follow Improve Article Tags : Websites & Apps ASP-Methods ASP-Basics Similar Reads ASP GetDriveName Method The ASP GetDriveName Method is used to return a string value that specifies the name of the drive for the specified path. It is a predefined method of the FileSystem Object. Syntax FileSystemObject.GetDriveName(path) Parameter Values path: It is a required attribute. It specifies the complete path 1 min read ASP GetFile Method The GetFile Method in ASP is used to return the File object corresponding to the file in a specified path. It is a predefined method of the FileSystem Object. Syntax: FileSystemObject.GetFile(path) Parameter Values: path: It is a required attribute. It specifies the path for the File. Example Code 1 min read ASP GetFolder Method The ASP GetFolder Method is used for returning the Folder object corresponding to the folder for a specified path. It is an in-built method of the FileSysten Object. Syntax: FileSystemObject.GetFolder(path) Parameter Values: Path:It is a required attribute. It specifies the path to a specified Fold 1 min read ASP DriveExists Method The ASP DriveExists Method is used for returning the Boolean Value which indicates that whether the particular drive will be exits or not. It returns true means the particular drive exits or returns false if the particular drive not exits. Syntax FileSystemObject.DriveExists(drive) Parameter Value 1 min read ASP GetFileName Method The GetFileName Method in ASP is used for returning the string value that represents the name of the ASP File. Or folder for the last component in a specified path. Syntax: FileSystemObject.GetFileName(path) Parameter Values: path: It is a required attribute. It specifies the absolute or a relative 1 min read Like