Find file

From AWVVO
Jump to navigationJump to search

Powershell

 try { Get-ChildItem -Path "C:\" -Filter "myfile.txt" -Recurse -ErrorAction Stop } catch { }

Powershell find string in file

Get-ChildItem -Path "path\to\search" -Filter "*.js" -Recurse -ErrorAction SilentlyContinue | Select-String -Pattern "your-search-string" -ErrorAction SilentlyContinue | Format-List