LoginSignup
0
0

More than 1 year has passed since last update.

PowerShellで特定の文字列があるファイルパス一覧を作成したい。

Posted at

PowerShellで特定の文字列があるファイルパス一覧を作成したい場合、
対象のフォルダでpowrshellを開き下記スクリプトを実行する。

Get-ChildItem -Recurse -Filter "hoge"  | ForEach-Object {$_.FullName} | Out-File "output.txt" 

【解説】
上記のスクリプトを実行するとファイル名に"hoge"が含まれる場合に、
output.txtにフルパスが出力される。

-Recurse 指定をしているのでカレントパスから下位フォルダ全てを検索する。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0