ASP Name Property Last Updated : 10 May, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The ASP Name Property is used for returning and setting the name of a specified file or Folder. Syntax:For File Object:FileObject.Name[=newname]For Folder Object: FolderObject.Name[=newname] Parameter Values:newname: It is an optional attribute. It specifies the new name of the file or folder.Example-1: Below code returns the name of the File. ASP <% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("d:\GFG.txt") Response.Write("The name of the file is: ") Response.Write(f.Name) set f=nothing set fs=nothing %> Output: The name of the file is GFG.txt Example -2: Below code returns the name of the Folder. ASP <% dim fs,fo set fs=Server.CreateObject("Scripting.FileSystemObject") set fo=fs.GetFolder("d:\GFG") Response.Write("The name of the folder is: ") Response.Write(fo.Name) set fo=nothing set fs=nothing %> Output:The name of the folder is : GFG Comment More infoAdvertise with us Next Article ASP Item Property M manaschhabra2 Follow Improve Article Tags : Websites & Apps Website & Apps ASP-Properties ASP-Basics Similar Reads ASP Item Property The ASP Item Property is used to return or set the value of an item in the Dictionary Object. Syntax: DictionaryObject.Item(key)[=newitem] Parameter Values: key: It specifies the key that is associated with an item. It is a required attribute.newitem: It specifies the new item that has to be set for 1 min read ASP Attributes Property The ASP Attributes Property is used for returning or setting the attributes of the specified file or folder. The attributes are defined with the following numerical values: 0: Normal file1: Read-only file2: Hidden file4: System file6: Folder or directory32: The file has changed since the last backup 2 min read ASP DriveLetter Property The ASP DriveLetter Property is used to return the upper-case letter that defines the local disk or a network share. Syntax: DriveObject.DriveLetter Example: The below code illustrates the ASP Drive Letter Property. ASP <% dim fs,dr set fs=Server.CreateObject("Scripting.FileSystemObject") 'Getti 1 min read ASP ShortName Property The ASP ShortName Property is used to get the short name of the specified file or folder on the system. Syntax: For File Object: FileObject.ShortName For Folder Object: FolderObject.ShortName The below examples illustrate the ASP ShortName Property. Example 1: The below code illustrates the ASP File 1 min read ASP ShareName Property The ASP ShareName Property is used to return the network share name of the specified drive. Syntax: DriveObject.ShareName Example: The below code demonstrates the ASP Drive.ShareName Property. ASP <% dim fs,d set fs=Server.CreateObject("Scripting.FileSystemObject") 'Getting the required drive set 1 min read ASP VolumeName Property The ASP VolumeName Property is used for setting or returning the volume name of the specified drive. Syntax: DriveObject.VolumeName[=newname] Parameters: This property has a single parameter as mentioned above and described below: newname: It specifies the new name that has to be set for the drive. 1 min read Like