DOS コマンドを目的別に調べることができる辞典

ホーム > DOS コマンド逆引き辞典 > ファイル閲覧 > サブディレクトリのファイルも含めて属性を表示する

DOS コマンド逆引き辞典

:: reverse dictionary ::

ファイル閲覧

サブディレクトリのファイルも含めて属性を表示する

サブディレクトリのファイルも含めて属性を表示するには、attrib コマンドに次の2つを指定して実行します。

≪ディレクトリ構造(サンプル)≫

D:ディレクトリ  F:ファイル

                        [属性]
D C:\MyDir
├ F sample01.txt       A
├ F sample02.txt       A    R
└ D SubDir
   ├ F sample03.txt    A  S
   ├ F sample04.txt    A   H
   └ F sample05.txt    A  SHR
C:\>attrib C:\MyDir\* /s
A  S       C:\MyDir\SubDir\sample03.txt
A   H      C:\MyDir\SubDir\sample04.txt
A  SHR     C:\MyDir\SubDir\sample05.txt
A          C:\MyDir\sample01.txt
A    R     C:\MyDir\sample02.txt

▼ コマンド

attrib [ドライブ:][パス][ファイル名] [/s]

/s スイッチを付けない attrib コマンドは、ファイル名をワイルドカードで指定してもサブディレクトリのファイルを表示しません。

C:\>attrib C:\MyDir\*
A          C:\MyDir\sample01.txt
A    R     C:\MyDir\sample02.txt

サブディレクトリのファイルも含めて属性を表示するには、/s スイッチをワイルドカードのファイル名と一緒に指定します。

注目キーワード ベスト5

  1. セキュリティ
  2. ホスティング
  3. レンタルサーバ
  4. ファイル復旧
  5. ハードディスク修復

ファイル閲覧 - browse a file -


ホーム > DOS コマンド逆引き辞典 > ファイル閲覧 > サブディレクトリのファイルも含めて属性を表示する

Copyright (C) 2005-2007 Noto Watabe. All rights reserved.
e-mail:wmh@always-pg.com