Skip to content

Instantly share code, notes, and snippets.

@JayHollingum
Created November 20, 2019 20:52
Show Gist options
  • Save JayHollingum/980e119c75c47d465004b91148f602f1 to your computer and use it in GitHub Desktop.
Save JayHollingum/980e119c75c47d465004b91148f602f1 to your computer and use it in GitHub Desktop.
PowerShell 6 script to bulk update file encoding
Get-ChildItem -Path C:\some-dir\* -Include *.ext -Recurse | ForEach-Object {
$content = Get-Content $_.FullName
$content | Out-File -Encoding UTF8NoBOM $_.FullName
#write-host "Encoding changed:" $_.FullName
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment