Created
August 29, 2016 12:35
-
-
Save andykuszyk/675159fd73b022a24ec3393b5a5eb84c to your computer and use it in GitHub Desktop.
A find and replace in files powershell script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param([string]$fileName, [string]$find, [string]$replace) | |
(Get-Content $fileName -encoding UTF8) | foreach-object { | |
$_ -replace $find, $replace | |
} | Set-Content $fileName -encoding UTF8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment