Tutorials References Exercises Sign Up Menu
Create Website Get Certified Pro

ASP Attributes Property

❮ Complete File Object Reference

The Attributes property is used to set or return the attribute or attributes of a specified file or folder.




Parameter Description
newattributes Optional. Specifies the attribute value for the file or folder.

Can take any of the following values or a combination of the following values:

0 = Normal file
1 = Read-only file
2 = Hidden file
4 = System file
16 = Folder or directory
32 = File has changed since last backup
1024 = Link or shortcut
2048 = Compressed file

Example for the File object

dim fs,f
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("c:\test.txt")
Response.Write("The attributes of the file are: ")
set f=nothing
set fs=nothing


The attributes of the file are: 32

Example for the Folder object

dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test")
Response.Write("The attributes of the folder are: ")
set fo=nothing
set fs=nothing


The attributes of the folder are: 16

❮ Complete File Object Reference