ASP AttributesProperty
Полный справочник по объекту Folder
Свойство Attributes используется для установки или возврата атрибутов указанного файла или папки.
Синтаксис
FileObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
| Parameters | Описание |
|---|---|
| newattributes | Необязательно. Указывает значение атрибута файла или папки. Может принимать одно из следующих значений или комбинацию следующих значений: 0 = Обычный файл. |
Пример для объекта 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
%>
Вывод:
Атрибуты файла: 32
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
%>
Вывод:
Атрибуты файла: 32
Пример для объекта Folder
<%
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
%>
Вывод:
Атрибуты папки: 16
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
%>
Вывод:
Атрибуты папки: 16
Полный справочник по объекту Folder Другие расширения