attrib

ファイル属性を表示または変更します。

属性ユーティリティ


attrib

  • C:\Windows\system32\attrib.exe /?

Output:

ファイル属性を表示または変更します。

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
       [ドライブ:][パス][ファイル名] [/S [/D]] [/L]

  +   属性を設定します。
  -   属性を解除します。
  R   読み取り専用ファイル属性。
  A   アーカイブ ファイル属性。
  S   システム ファイル属性。
  H   隠しファイル属性。
  O   オフライン属性。
  I   非インデックス対象ファイル属性。
  X   スクラブ ファイルなし属性。
  V   整合性属性。
  P   固定属性。
  U   固定解除属性。
  B   SMR BLOB 属性。
  [ドライブ:][パス][ファイル名]
      attrib で処理するファイルを指定します。
  /S  現在のフォルダーとすべてのサブフォルダーの一致するファイルを
      処理します。
  /D  フォルダーも処理します。
  /L  Symbolic Link のターゲットに対する Symbolic Link
      の属性で動作します
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
       [drive:][path][filename] [/S [/D]] [/L]

  +   Sets an attribute.
  -   Clears an attribute.
  R   Read-only file attribute.
  A   Archive file attribute.
  S   System file attribute.
  H   Hidden file attribute.
  O   Offline attribute.
  I   Not content indexed file attribute.
  X   No scrub file attribute.
  V   Integrity attribute.
  P   Pinned attribute.
  U   Unpinned attribute.
  B   SMR Blob attribute.
  [drive:][path][filename]
      Specifies a file or files for attrib to process.
  /S  Processes matching files in the current folder
      and all subfolders.
  /D  Processes folders as well.
  /L  Work on the attributes of the Symbolic Link versus
      the target of the Symbolic Link

Return Code: 0


example


c:\example>dir /b
1Read-only file.txt
2Archive file.txt
3System file.txt
4Hidden file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat

c:\example>attrib
A                    C:\example\1Read-only file.txt
A                    C:\example\2Archive file.txt
A                    C:\example\3System file.txt
A                    C:\example\4Hidden file.txt
A                    C:\example\5Offline file.txt
A                    C:\example\6Not content indexed file.txt
A                    C:\example\7No scrub file.txt
A                    C:\example\8Pinned file.txt
A                    C:\example\9Unpinned file.txt
A                    C:\example\example.bat

c:\example>attrib +S "3System file.txt"

c:\example>attrib +H "4Hidden file.txt"

c:\example>dir /b
1Read-only file.txt
2Archive file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat

c:\example>attrib +R "1Read-only file.txt"

c:\example>attrib +A "2Archive file.txt"

c:\example>attrib +O "5Offline file.txt"

c:\example>attrib +I "6Not content indexed file.txt"

c:\example>attrib +X "7No scrub file.txt"

c:\example>attrib +P "8Pinned file.txt"

c:\example>attrib +U "9Unpinned file.txt"

c:\example>attrib
A    R               C:\example\1Read-only file.txt
A                    C:\example\2Archive file.txt
A  S                 C:\example\3System file.txt
A   H                C:\example\4Hidden file.txt
A      O             C:\example\5Offline file.txt
A       I            C:\example\6Not content indexed file.txt
A          X         C:\example\7No scrub file.txt
A            P       C:\example\8Pinned file.txt
A             U      C:\example\9Unpinned file.txt
A                    C:\example\example.bat

c:\example>dir /b
1Read-only file.txt
2Archive file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat

c:\example>del *txt
c:\example\1Read-only file.txt
アクセスが拒否されました。

c:\example>dir /b
1Read-only file.txt
example.bat

c:\example>attrib -R "1Read-only file.txt"

c:\example>attrib
A                    C:\example\1Read-only file.txt
A  S                 C:\example\3System file.txt
A   H                C:\example\4Hidden file.txt
A                    C:\example\example.bat

c:\example>dir /b /a
1Read-only file.txt
3System file.txt
4Hidden file.txt
example.bat

c:\example>del /a *txt

c:\example>dir /b /a
example.bat

管理者権限(Administrator)

C:\Windows\system32\attrib.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
FileInfo
File Size23040bytes
Creation Time2019/12/07 18:09:33
LastWrite Time2019/12/07 18:09:33
ProductVersion10.0.19041.1889
FileVersion10.0.19041.1889 (WinBuild.160101.0800)
HashValue
MD55037d8e6670ef1d89fb6ad435f12a9fd
SHA1b8337fa20077a2c6db7d01ccc18e328a91255745
SHA224a8303373e882afdbff54e832dbf2c77713cb7c5a75839817875b8b2c
SHA2561043111ff07814b0d3439561b4cee5d7ec1799a7a0a419949fee707666f6dded
SHA384eb296f04b98e4ade3517ddcb6b6efa60bd2b4d2b636a62383e25922c470be823ca67b876223d9b1532cb0be227aabed2
SHA5125bf517a500d25bfa57445e51750a51cebfc3c325bbcdc5d7ee0e9c3109f5f0dc6259fde8417a24afc1c608c44d090be3630663e0b1536e6fb30e5eafd4621f4f
最終更新 Sep 29, 2022 11:03 UTC
Built with Hugo
テーマ StackJimmy によって設計されています。