param($targetpath,$txtpath,$OutputFile)
$searchtxt =Get-Content $txtpath
$searcharray = $searchtxt.Split("\r\n")
foreach($s in Get-ChildItem -file -Recurse -Path $targetpath){
if($searcharray -contains $s){
echo $s.FullName | Out-File -Append -Encoding oem $OutputFile
}
}
More than 5 years have passed since last update.
ファイルを検索して対象のテキストに含まれるファイル名と同じものがあったらそのファイルのフルパスをアウトプットに保存する
Last updated at Posted at 2015-10-31
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme