Created
May 21, 2025 13:12
-
-
Save sofferm/9e099fe60ff92b552a7e8c94fdaa1666 to your computer and use it in GitHub Desktop.
Suchen/Ersetzen in Textdateien
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
| $configFiles=get-childitem -Include *.html,*.xml -Recurse -Path C:\data\myproject | |
| foreach ($file in $configFiles) | |
| { | |
| (Get-Content $file.PSPath) | | |
| Foreach-Object {$_ -replace "server.invalid.com", "new.example.org"} | | |
| Foreach-Object {$_ -replace "/OldFolder/", "/NewFolder/"} | | |
| Set-Content $file.PSPath | |
| Write-Output $file.PSPath | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment