* ファイル属性操作 [#wedc0291]

** 隠し属性ファイル・フォルダの表示 [#ucc08378]

 dir -Hidden  # 隠し属性のファイルのみ表示
 dir -Force   # すべてのファイルの表示

** 隠しファイル属性の付与 [#hfca1a63]

 $file = get-item foo.txt
 $file.Attributes = 'Hidden'
 # これでfoo.txtは隠しファイルになった

** ファイル属性の削除 [#b91ed588]
 $file = get-item -Force foo.txt # 隠しファイルをget-itemするには-Forceが必要
 $file.Attributes = 'Hidden'


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS