Find Files

Use the following native commands to find files or their content on Windows.

Find Files

cmd.exe
dir /b /s C:\[filename]
PowerShell
ls -r C:\ [filename] 2>$null | % { echo $_.fullname }

Tip

Use gc $_.fullname instead of echo $_.fullname to display the content of each file found.

Find Content

Find all files containing a specific pattern.

cmd.exe
findstr /N /S /I "[pattern]" \path\to\base\dir\supporting\*.ext
PowerShell
ls -r C:\ | % { Select-String -Path $_ -Pattern [pattern] } 2>$null