现在的位置: 首页 > 综合 > 正文

ASP Attributes 属性

2013年11月22日 ⁄ 综合 ⁄ 共 503字 ⁄ 字号 评论关闭
文章目录

ASP Attributes 属性

Folder 对象参考手册

定义和用法

Attributes 属性可用来设置或返回指定的文件或文件夹的属性。

语法:

FileObject.Attributes[=newattributes] 
FolderObject.Attributes[=newattributes]
参数 描述
newattributes

可选的。规定文件或文件夹的属性值。

才采用下列的值之一或下列值的组合:

  • 0 = 常规文件
  • 1 = 只读文件
  • 2 = 隐藏文件
  • 4 = 系统文件
  • 16 = 文件夹或目录
  • 32 = 自从上次备份,文件已经改变
  • 1024 = 链接或快捷方式
  • 2048 = 压缩文件

实例

<%
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
%>

输出:

The attributes of the file are: 32

Folder 对象参考手册

抱歉!评论已关闭.