Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.24 KB

Find-StringInFile.README.md

File metadata and controls

39 lines (26 loc) · 1.24 KB

Find-StringInFile

Find a string in one or multiple files.

Description

Find a string in one or multiple files. The search is performed recursively from the start folder.

Screenshot

Syntax

Find-StringInFile [-Path] <String> [-Search] <String> [[-CaseSensitive]] [<CommonParameters>]

Example 1

PS> Find-StringInFile -Path "C:\Scripts\FolderWithFiles" -Search "Test01"
       
Filename    Path                      LineNumber IsBinary Matches
--------    ----                      ---------- -------- -------
File_01.txt E:\Temp\Files\File_01.txt          1    False {Test01}
File_02.txt E:\Temp\Files\File_02.txt          1    False {TEST01}
File_03.txt E:\Temp\Files\File_03.txt          1    False {TeST01}

Example 2

PS> Find-StringInFile -Path "C:\Scripts\FolderWithFiles" -Search "TEST01" -CaseSensitive

Filename    Path                      LineNumber IsBinary Matches
--------    ----                      ---------- -------- -------
File_02.txt E:\Temp\Files\File_02.txt          1    False {TEST01}