ASP@Workshop 
HOME > ASPリファレンス > File オブジェクト > Attributes

Attributes (File オブジェクト)

object.Attributes

引数

object
File オブジェクトの名前を指定します。

解説

ファイルの属性を設定します。
定数内容
Alias1024リンクまたはショートカット(読取専用)
Archive32前回のバックアップ以降に変更
Compressed2048圧縮ファイル(読取専用)
Directory16フォルダまたはディレクトリ(読取専用)
Hidden2隠しファイル
Normal0標準ファイル
ReadOnly1読取専用
System4システムファイル

使用例

Set objFso = Serrver.CreateObject("Scripting.FileSystemObject")

Set objFile = objFso.GetFile("c:\test.txt")

' 読取専用に変更
objFile.Attributes = 1

' 属性を表示
Response.Write objFile.Attributes

関連項目

CopyDeleteMoveOpenAsTextStreamDateCreatedDateLastAccessedDateLastModifiedDrive
NameParentFolderPathShortNameShortPathSizeType



ASPリファレンス

FileSystemObject オブジェクト
Drive オブジェクト
Folder オブジェクト
File オブジェクト
Drives コレクション
Folders コレクション
Files コレクション


Copyright (C) 2006-2008 ASP@Workshop All rights reserved.