当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Attributes 属性
The Attributes property is used to set or return the attribute or attributes of a specified file or folder.
ASP Attributes属性的作用是设置或返回一个指定文件或文件夹的属性值。
| FileObject.Attributes[=newattributes] FolderObject.Attributes[=newattributes] |
| 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 |
<%
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
%> Output: The attributes of the file are: 32 |
<%
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:test")
Response.Write("The attributes of the folder are: ")
Response.Write(fo.Attributes)
set fo=nothing
set fs=nothing
%> Output: The attributes of the folder are: 16 |
评论 (0) All