Return to Snippet

Revision: 49317
at July 19, 2011 22:08 by danfsmith


Initial Code
$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
}

Initial URL

                                

Initial Description

                                

Initial Title
Replace Content in HTML Files in a Folder

Initial Tags
html, replace

Initial Language
Windows PowerShell