Replace a string in one or multiple files.
Replace a string in one or multiple files. Binary files (*.zip, *.exe, etc.) are not touched by this script.
Update-StringInFile [-Path] <String> [-Find] <String> [-Replace] <String> [[-CaseSensitive]] [<CommonParameters>]
PS> Update-StringInFile -Path E:\Temp\Files\ -Find "Test1" -Replace "Test2" -Verbose
VERBOSE: Binary files like (*.zip, *.exe, etc...) are ignored
VERBOSE: Total files with string to replace found: 3
VERBOSE: Current file: E:\Temp\Files\File_01.txt
VERBOSE: Number of strings to replace in current file: 1
VERBOSE: Current file: E:\Temp\Files\File_02.txt
VERBOSE: Number of strings to replace in current file: 1
VERBOSE: Current file: E:\Temp\Files\File_03.txt
VERBOSE: Number of strings to replace in current file: 2