/fifi

Find-InFiles (aka fifi) - Finds a string within files of a specific type within the given locations and/or files with names containing that string.

Primary LanguagePowerShellGNU General Public License v3.0GPL-3.0

fifi

Find-InFiles (aka fifi) - Finds a string within files of a specific type within the given locations and/or files with names containing that string.

installation

Install-Module Find-InFiles

parameters

-Needle

-Haystacks (default to current directory, recursive on)

-FileTypes (defaults to bat/cmd/ps1/psm1/sql)

-MaxAge

examples

  1. To find files in your current directory (and any below) containing the string 'waldo':

fifi waldo

  1. To find 'waldo' inside PowerShell files within your PSModulePath:

Find-InFiles -Haystacks $($env:PSModulePath + ',' -replace(';', ',') -replace(',', '%,') -replace('\\%', '%') | Sort-Object -Unique) -FileTypes '.ps1,.psm1' -Needle 'waldo' -NameMatch