VOOZH about

URL: https://www.geeksforgeeks.org/websites-apps/asp-name-property/

⇱ ASP Name Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

ASP Name Property

Last Updated : 10 May, 2025

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. 

Output: 

The name of the file is GFG.txt 

Example -2: Below code returns the name of the Folder. 

Output:

The name of the folder is : GFG
Comment