ファイルまたはディレクトリの属性を得る。
getfileattr <filename>
| 値 | 意味 |
|---|---|
| $1 | 読み取り専用 |
| $2 | 隠しファイルまたは隠しディレクトリ |
| $4 | オペレーティングシステムの一部、またはオペレーティングシステム専用 |
| $10 | ディレクトリ |
| $20 | アーカイブ |
| $80 | 特に属性はない |
| $100 | 一時ファイル |
| $200 | スパースファイル |
| $400 | 再解析ポイントが関連付けられているか、シンボリックリンク |
| $800 | 圧縮されている |
| $1000 | オフラインの記憶装置へ物理的に移動された(Windows 2000 以降) |
| $2000 | 「インデックスサービス」の対象になっていない(Windows 2000 以降) |
| $4000 | 暗号化されている |
file = 'c:\test.txt' getfileattr file if result <> -1 then if result & $1 > 0 then messagebox 'This file has readonly attribute.' file endif endif