$FileName ='' $OldLine = '' $NewLine = '' $Drives = Get-PSDrive -PSProvider FileSystem foreach ($Drive in $Drives) { Push-Location $Drive.Root Get-ChildItem -Filter "$FileName" -Recurse | ForEach { (Get-Content $_.FullName).Replace($OldLine, $NewLine) | Out-File $_.FullName } Pop-Location }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter