<t>Give this a try:<br/>
<br/>
Get-ChildItem "C:\Users\gerhardl\Documents\My Received Files" -Filter *.log | <br/>
Foreach-Object {<br/>
$content = Get-Content $_.FullName<br/>
<br/>
#filter and save content to the original file<br/>
$content | Where-Object {$_ -match 'step[49]'} | Set-Content $_.FullName<br/>
<br/>
#filter and save content to a new file <br/>
$content | Where-Object {$_ -match 'step[49]'} | Set-Content ($_.BaseName + '_out.log')<br/>
}<br/>
<br/>
```</t>