Based on the suggestion from mnmnc I made a Powershell script that seems to do the trick. It's slow, but it gives me the results I want.
$phrases = ("*Wildcard*,*separated*,*array*,*of*,*search*,*terms*")
Remove-Item .\results.txt
foreach ($p in $phrases){
$results = @(Get-ChildItem -Recurse -Path 'E:\myPath\' -Filter "$m" | where{$_.Extension -match "doc|docx|pdf|txt|xls|xlsx"} | Select-Object Fullname)
if($results.count -ne 0){
$m + " " + $results.length >> ".\results.txt"
$results >> ".\results.txt"
"
" >> ".\results.txt"
}
}
This loops through the phrases and sees if there are any files of the allowed extension that match the search phrase. The results are put into an array, and if the array has any elements the phrase, number of results, and file names are printed into a text file.
That foreach loop is probably terribly expensive and I wouldn't be surprised if there were a better way of doing it, but I'm just letting this run in the background, so I don't mind it taking a while.
Install Powershell from microsoft. The task you want to perform is a few lines long script. single for loop changing match pattern for each iteration. – mnmnc – 2012-12-19T13:15:42.890
Thanks for the suggestion. I solved the problem based on your idea. – Petter Brodin – 2012-12-20T11:00:16.250
Good to know that. cheers. – mnmnc – 2012-12-20T11:08:05.917