ASP GetDriveName Method Last Updated : 02 Mar, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 of the file from which the drive name returns. Example 1: Below code demonstrates the ASP GetDriveName Method. JavaScript <% dim fs,dname set fs=Server.CreateObject("Scripting.FileSystemObject") dname=fs.GetDriveName("d:\hello\sudo.html") Response.Write(dname) set fs=nothing %> Output: d Example 2: JavaScript <% dim fs,dname set fs=Server.CreateObject("Scripting.FileSystemObject") dname=fs.GetDriveName("C:\inetpub\wwwroot\asptest\GFG.txt") Response.Write(dname) set fs=nothing %> Output: c Comment More infoAdvertise with us Next Article ASP GetDriveName Method M manaschhabra2 Follow Improve Article Tags : Websites & Apps ASP-Methods Similar Reads 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: drivespec: It is a required attribute. It can be a drive letter (c 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 ASP GetBaseName Method The GetBaseName Method in ASP is used for returning the base name of the file or folder from the specified location of the file. It is a predefined method of the FileSystem Object. For Example The BaseName of the file having path d::/hello/GFG/sudo.asp is sudo.asp. Syntax FileSystemObject.GetBaseN 1 min read ASP GetTempName Method The ASP GetTempName Method is used for returning the randomly generated file or folder from the system.  It is an in-built method of the FileSystem Object. Syntax: FileSystemObject.GetTempName Parameter Values: This method does not contain any parameter value. Example: Below code demonstrates the 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 Like