ASP Attributesプロパティ
Folder オブジェクトの完全なリファレンス
Attributes プロパティは、指定したファイルまたはフォルダーの属性を設定または返すために使用します。
構文
FileObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
FolderObject.Attributes[=newattributes]
| パラメータ | 説明 |
|---|---|
| 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
%>
出力:
The attributes of the file are: 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
%>
出力:
The attributes of the file are: 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
%>
出力:
The attributes of the folder are: 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
%>
出力:
The attributes of the folder are: 16
Folder オブジェクトの完全なリファレンス その他の拡張