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 file
- 1: Read-only file
- 2: Hidden file
- 4: System file
- 6: Folder or directory
- 32: The file has changed since the last backup
- 1024: Link or shortcut
- 2048: Compressed file
For a File Object:
For a Folder Object:
Parameters: This property has a single parameter as mentioned above and described below:
- newattributes: It specifies the attributes that have to be set for the given file or folder. It is an optional attribute.
The below examples demonstrate the ASP Attributes Property.
Example 1: The below code returns the attributes of the file.
The attributes of the file are: 1024
Example 2: The below code returns the attributes of the folder.
The attributes of the folder are: 18