The function
function findf {
Write-Host "Find files that match: $args"
gci -r | Where-Object { $_.name -match ".*$args.*" }
}
doesn't seem to work. For example,
findf .exe
-- Prints a bunch of stuff not limiting output to EXE files --
Any ideas what I'm doing wrong?
If I run the same command from the PowerShell command window the command works:
gci -r | Where-Object { $_.name -match ".*.exe.*" }
This works and correctly shows me the files that match the *.EXE pattern