:: reverse dictionary ::
ファイルの属性を変更するには、attrib コマンドに次の2つを指定して実行します。
| 変更属性 | 動作 |
|---|---|
| +a | アーカイブ属性を設定 |
| -a | アーカイブ属性を解除 |
| +h | 隠し属性を設定 |
| -h | 隠し属性を解除 |
| +r | 読み取り専用属性を設定 |
| -r | 読み取り専用属性を解除 |
| +s | システム属性を設定 |
| -s | システム属性を解除 |
D:ディレクトリ F:ファイル [属性] D C:\MyDir └ F sample.txt A
C:\>attrib +r C:\MyDir\sample.txt C:\>attrib C:\MyDir\sample.txt A R C:\MyDir\sample.txt
attrib [+r | -r] [+a | -a] [+s | -s] [+h | -h] [ドライブ:][パス][ファイル名]
attrib コマンドに変更属性とファイル名を指定して実行すると、そのファイルの属性を変更します。
変更属性が + の場合は属性を設定し、- の場合は属性を解除します。
変更属性は、複数指定できます。
C:\>attrib +h +s C:\MyDir\sample.txt C:\>attrib C:\MyDir\sample.txt A SHR C:\MyDir\sample.txt
隠し属性、またはシステム属性が設定されている場合、他の属性を再設定できなくなります。
C:\>attrib C:\MyDir\sample.txt A SHR C:\MyDir\sample.txt C:\>attrib -a C:\MyDir\sample.txt 隠しファイルは再設定できません - C:\MyDir\sample.txt
他の属性を再設定したい場合は、隠し属性またはシステム属性を解除する必要があります。
C:\>attrib -h -s C:\MyDir\sample.txt
C:\>attrib -a C:\MyDir\sample.txt
C:\>attrib C:\MyDir\sample.txt
R C:\MyDir\sample.txt
| attrib | … | ファイルの属性を表示する |
Copyright (C) 2005-2007 Noto Watabe. All rights reserved.
e-mail:wmh@always-pg.com