Created
November 20, 2019 20:52
-
-
Save JayHollingum/980e119c75c47d465004b91148f602f1 to your computer and use it in GitHub Desktop.
PowerShell 6 script to bulk update file encoding
This file contains 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
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