/ Published in: Windows PowerShell
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$Path = "C:\Path\" $HtmlFiles = Get-ChildItem $Path -Filter *.* -Recurse foreach ($file in $HtmlFiles) { Write-Host "Examining" $file (Get-Content $file.FullName) | Foreach-Object {$_ -replace "REPLACEME", "NEWCONTENT"} | Set-Content $file.FullName }