ASP Attributes Property

Definition and Usage

The Attributes property can be used to set or return the specified file or folder attributes.

Syntax:

FileObject.Attributes[=newattributes] 
FolderObject.Attributes[=newattributes]
Parameter Description
newattributes

Optional. Specifies the attribute value of the file or folder.

Use one 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 the last backup
  • 1024 = link or shortcut
  • 2048 = compressed file

实例

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

Tulostus:

Tiedoston ominaisuudet: 32