This is similar to what I need. I was able to combine some of the information from Jared's answer with this question to figure it out.
foreach($f in $(gci -re -in hoot.txt "C:\temp")) {
mv $f.FullName "$($f.FullName).old"
}
In the interest of wealth sharing, here is my * nix find imitation function.
function unix-find (
$path,
$name="*.*",
$mtime=0)
{
gci -recurse -include "$name" "$path" |
where-object { -not $_.PSIsContainer -and ($_.LastWriteTime -le (Get-Date).AddDays(-$mtime)) } |
foreach { $_.FullName }
}
source
share