Created
February 9, 2018 10:19
-
-
Save gpsarkar/6ab9ab890fa15d74e76b197121b34d74 to your computer and use it in GitHub Desktop.
powershell to rename string in files recursive
This file contains 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
Get-ChildItem -r -Depth 1 -include "web.config" | | |
foreach-object { $a = $_.fullname; ( get-content $a ) | | |
foreach-object { $_ -replace "oldstring","newstring" } | | |
set-content $a } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment