"-filter" を使用して:Windows10/Powershell:Get-Childitemを使用するときに-includeパラメータを使用する方法?
Get-ChildItem -file -filter "*.txt" | foreach-object { write-host $_.FullName
}
私は現在のフォルダにあります4つの.txtファイルの一覧を取得します。
私は "-include"
Get-ChildItem -file -include *.txt | foreach-object { write-host $_.FullName }
Get-ChildItem -file -include *txt | foreach-object { write-host $_.FullName }
を使用してみましたし、私は何を取得。私は "-file"パラメータを付けて試してみましたが、違いはありません。
私は様々なガイド/例(ss64.com/TechNetなど)を見てきたと思いますが、私はそれを正しくやっています。
私は間違っていますか?ありがとう!
関連:https://stackoverflow.com/questions/33684178/powershell-5-get-childitem-literalpath-doesnt-work-with-include-anymore –